Tag archive for "procedure"
Procedures and functions (including methods) also need initialization and finalization code.
This procedure processes assignment statements and procedure/function calls. It first checks for variable expression, then if the token is procedure or function it generates code to call procedure (or function), for functions it processes qualifiers in a loop and stops if it finds assignment token.
Calls to all procedures, functions and methods are processed from this procedure. It takes care for pushing all parameters and generates instruction to call the procedure.
This procedure processes Pascal declarations: Constants, Types, Variables, Procedures, Functions, and if declarations are not in the Interface part of the unit, also Lables, Constructors and Destructors are processed. Before declarations are processes, statement compiler switches are reset to module compiler switches. This procedure is called from program compilation, unit interface and implementation compilation and …
Turbo Pascal uses few procedures to process declaration of procedures and functions. The same code is also used to process methods, constructors and destructors. The first procedure processes header.