[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Program, Unit, Procedure, and Function structure
----------------------------------------------------------------------
PROGRAM ProgramName;
USES Library names;
LABEL
labels;
CONST
constant declarations;
TYPE
data type declaration;
VAR
variable type declarations;
PROCEDURE ProcedureName;
LABEL
labels;
CONST
constant declarations;
TYPE
data type declarations;
VAR
variable type declarations;
BEGIN
procedure statements;
END;
FUNCTION FunctionName : DATATYPE;
LABEL
labels;
CONST
constant declarations;
TYPE
data type declarations;
VAR
variable type declarations;
BEGIN
function statements;
END;
BEGIN
Statements;
Procedures;
Functions;
END.
The names of procedures, functions, labels, variables, types,
and constants are unique to each procedure, function or unit
they are declared in.
Procedures and Functions can be nested within other procedures
and functions. They may also be recursive, ie. they may call
themselves.
---------------------------------------------------------------
UNIT STRUCTURES
UNIT UnitName;
INTERFACE
USES library names;
procedure and function forward declarations;
IMPLEMENTATION
Procedures and functions go here
END.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson