BRANCH var comparisons labels`
multi-way branching
CROSSREF labl1 labl2 labl3 labl4 labl5 labl6 labl7 labl8
define cross reference labels for the 8 parameters
DEFINE/LOCAL key_def data A lower_levels_flag
define the maximum no. of parameters for a procedure
DEFINE/PARAMETER Pi default type/option prompt_str low_lim,hi_lim
define default, type and valid interval for parameter i
DO loopvar = start end [step]
define a DO loop (as in FORTRAN)
ENTRY proc
define begin of procedure in a file with different name than the procedure
GOTO label
branch to command line containing label:
IF par1 op par2 command_string
execute conditional statement
INQUIRE/KEY key prompt_string
get terminal input in a MIDAS procedure
LABL:
define a label, LABL in this example
RETURN par1 par2 par3
return to calling procedure (or terminal) and optionally pass up to 3 parameters back