guides:programming:programmers_reference_manual:function_statement

Function statement

Identifies a program to the compiler as a function. The Compile Function line must be the first line in the program. The parameters that follow name specify the arguments that will be passed when this function is called from within another program.

[Compile] Function name ([ [datatype] parameter, …])

statements

Return expression

The Function declaration has the following parameters.

ParameterDescription
nameAny legal identifier may be used as the name of the function. A Return statement must include a return value located at a logical termination of the program.
datatypeOpenInsight for Workgroups does not require data typing of parameters.
parameterAt least one parameter is required. Multiple parameters are delimited with commas. Specify void as a parameter if no parameters are desired.

The calling procedure has to provide the same number of arguments as are specified in the called function.

Declare, Return. Refer to the sample application provided with OpenInsight for example functions.

  • guides/programming/programmers_reference_manual/function_statement.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1