[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Turbo Pascal Structure
PROGRAM STRUCTURE:
PROGRAM ProgramName;
USES UnitNames;
LABEL
LabelNames;
CONST
constant declarations;
TYPE
data type declaration;
VAR
variable type declarations;
BEGIN
.
.
.
END.
PROCEDURE STRUCTURE:
PROCEDURE ProcedureName;
LABEL
LabelNames;
CONST
constant declarations;
TYPE
data type declarations;
VAR
variable type declarations;
BEGIN
.
.
.
END;
FUNCTION STRUCTURE:
FUNCTION FunctionName : ResultType;
LABEL
LabelNames;
CONST
constant declarations;
TYPE
data type declarations;
VAR
variable type declarations;
BEGIN
.
.
.
END;
UNIT STRUCTURE:
UNIT UnitName;
INTERFACE
USES UnitNames;
Procedure and Function forward declarations;
IMPLEMENTATION
Procedures and Functions
END.
NOTE:
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.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson