E Language Reference

Overview of Functions

See Also

Functions must have a declaration and definition. The function definition includes the function body — the code that executes when the function is called.

A function declaration establishes the name, return type, and attributes of a function that is defined in the braces that follow the declaration. A function declaration/definition must precede the call to the function.

The compiler uses the declaration to compare the types of arguments in subsequent calls to the function with the function's parameters and to convert the types of the arguments to the types of the parameters whenever necessary.

A function call passes execution control from the calling function to the called function. The arguments, if any, are passed by value to the called function. Execution of a return statement in the called function returns control and possibly a value to the calling function.

See Also