Statement INIT PROCEDURE Foundation
Declares a procedure which executes at the start of a program.
INIT PROCEDURE <ProcedureName> [( <Parameters,...> )]
[LOCAL <VarName_L> [ [:= <Expression>],...]]
[MEMVAR <VarName_M,...>]
[FIELD <FieldName,...> [IN <AliasName>]]
<SourceCode>
[RETURN]
INIT PROCEDURE declares start procedures which are automatically called before the main routine of an Xbase++ program takes the control. The parameters supplied on the command line are passed to each procedure declared as an INIT PROCEDURE. If a runtime error occurs during a start procedure, the program is immediately terminated.
INIT PROCEDURE routines cannot be called during program runtime. They are only visible to the startup code that maintains a list of INIT PROCEDURE routines. The order in which INIT PROCEDURE routines are called is not predictable. As soon as an INIT PROCEDURE ends, the next is called. After the last INIT PROCEDURE ends, control passes to the Main function or procedure of an Xbase++ application.
The ANNOUNCE statement declares a symbolic name for the linker. In order to link existing INIT PROCEDURE routines into a new application, the appropriate program module (PRG file) must be explicitly requested with REQUEST.
To follow the program execution of INIT PROCEDUREs in the debugger, it must be started using the command line option "-i".
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.