Script structure

Top  Previous  Next

Every script in DB Doc requires a Main procedure.  This procedure is called to generate the database documentation.  It as defined as such:

 

scripting_01

 

Each line needs to be terminated with a semi-colon (;), except for a begin block. Functions and procedures need to be defined before they can be called.  The following script is invalid because Foo is called before it is defined.

 

scripting_02

 

The script needs to be rewritten to define Foo before it is called i.e.

 

scripting_03

 

This basically means that the Main procedure is usually the last procedure in the script, if it calls other procedures and functions.

 

Every procedure and function must contain a begin..end block.  Variables are defined using the var keyword, and is defined before the begin block.  You can define variables for the basic data types, and also for the classes supported by the script engine.

 

scripting_05