Language Reference

START and FINISH Statements

define a module

START <name> <(arguments)> <GLOBAL(arguments)>;
           module statements;
FINISH <name>;

The inputs to the START and FINISH statements are as follows:


name
is the name of a user-defined module.

arguments
are names of variable arguments to the module. Arguments can be either input variables or output (returned) variables. Arguments listed in the GLOBAL clause are treated as global variables. Otherwise, the arguments are local.

module statements
are statements making up the body of the module.

The START statement instructs IML to enter a module-collect mode to collect the statements of a module rather than execute them immediately. The FINISH statement signals the end of a module. Optionally, the FINISH statement can take the module name as its argument. When no name argument is given in the START statement, the module name MAIN is used by default. If an error occurs during module compilation, the module is not defined. See Chapter 5 for details.

The following example defines a module named MYMOD that has two local variables (A and B) and two global variables (X and Y). The module creates the variable Y from the arguments A, B, and X.

  
 start mymod(a,b) global(x,y); 
    y=a*x+b; 
 finish;
 

Previous Page | Next Page | Top of Page