next up previous index
Next: Calling sequences Up: The COMIS compiler Previous: Other language elements

Subsections



Programs


Main program

The COMIS main program syntax is:

   [PROGRAM name]
   [Declaration statements]
   [Executable statements]
   END
The main program is executed immediately whenever its definition is finished. The COMIS system ``remembers'' all declarations of common blocks issued in the main program. These declarations should not be repeated each time the main program is redefined. Moreover these declarations are valid for other subprograms through the USE statement (see section 2.3) This does not mean that you cannot enter the new COMMON declarations during the main program redefinition.


Functions and subroutines

The colon character ``:'' is the short form of key words FUNCTION and SUBROUTINE. Actual arguments may be constants, variables, arithmetic expressions, arrays, arrays elements or subroutines names.

COMIS does not allow a character expression and alternate return specifiers as an actual arguments. The COMIS extensions are:

For details see Appendix B. COMIS does not accept statement functions, functions of a character type and an ENTRY statement. The full set of intrinsic functions supplied in the COMIS system excepting CHAR, LLT, LLE, LGT, LGE.


next up previous index
Next: Calling sequences Up: The COMIS compiler Previous: Other language elements
Back to CERN | IT | ASD | CERN Program Library Home
MG (last mod. 1998-08-19)