The Compile Keyword (Optional)
The Compile keyword tells OpenInsight for Workgroups to compile the function or subroutine. The Compile keyword is optional. OpenInsight attempts to compile the function or subroutine and saves a copy of the source code to the SYSPROCS system table, even if the compilation is unsuccessful. The BASIC+ programs you write as stored procedures are stored as rows in the SYSPROCS table. If the compilation is successful, the object code and debug table are saved to the SYSOBJ system table. If the stored procedure cannot be compiled, OpenInsight returns an error code describing the problem and displays the output in the Results Viewer window.
Example
[Compile] Function Count_Invoices([INTEGER] inv_count)
where:
- compile is a process statement. (optional)
- function is a type of stored procedure.
- count_invoices is the name of the function.
- integer is a type of parameter; this is optional.
- inv_count is the name of the parameter.
Note: The subroutine type of stored procedure must have at least one parameter. Functions do not require a parameter. Either type of stored procedure can have multiple parameters.