function-head argument-decl-list block
A function definition begins with a type specifier, the name of the function, and parentheses surrounding a comma-separated list of arguments. Any bindings may be given here using the
You may omit the type specifier before the function name, in which case the function's type is int. You may also omit the declaration for any argument, in which case the argument will be an int. Note that unlike some languages such as Pascal, if there are no arguments, an empty pair of parentheses must still appear, both in the definition and where you call the function.
You may also define functions using ANSI C/C++ syntax, in which type information for function arguments appears with the argument names inside parentheses. These function headers have the same effect:
When you call a function, arguments of type char or short are automatically changed to ints. A corresponding change happens to declarations of function arguments and return values. Additionally, function arguments declared as an array of some type are changed to be a pointer to the same type, just as array variables are changed to pointers to the start of the array when their names appear in expressions (see Constants and Identifiers). For example, these two function headers have the same effect.
The user can call any function which takes no arguments, or bind such
a function to a key. Functions which are normally invoked in this
way can be made commands with the
Sometimes it is necessary to declare an identifier as a function, although the function is actually defined in a separately compiled source file. For example, you must declare a function before you use a pointer to that function. Also, the EEL compiler must know that a function returns a non-numeric type if its return value is used. Any declaration of an identifier with type function returning ... is a function declaration. Function declarations may appear anywhere a local or global variable declaration is legal. So long as the identifier is not masked by a local variable of the same name, the declaration has effect until the end of the file.
Any function named when_loading( ) is automatically executed when
you load the bytecode file it appears in into Epsilon. There may be
any number of