A function is a sequence of commands intended for executing operations in the program. A function may be both global (public) and local. A global function may include own local variables and own local functions. A local function makes use of the local variables of the global function in which it is defined; it has no own local variables or functions. A global function can contain input and output variables, a local function can not.
A constituent of each program is the main function
. This function is executed after the program has been started. By ending it the program is terminated, too. After a new program has been created the main function is already created in the group of basic variables and functions. A main function can neither be deleted nor it can be called from other functions. In the program window title its name is used as a default name, its icon is used as a program icon.
A declaration of a new function is established by dragging an empty function from the field of the library of variables and functions. Unlike the variables, predefined function templates cannot be stored in the library. A declaration can be established in the field of either global or local variables and functions. For a global function a field for the declaration of local variables and functions
will be created.
Full Html Context Help of The Peter - Gemtree Software & Children Programming