What are the parts of the turbo pascal program ? – Technology

Report
Question

Please briefly explain why you feel this question should be reported .

Report Cancel

Answer

Every Pascal program must follow a basic structure. While this
structure is very similar to Karel programming, there are several
differences. Below is the basic structure that every Pascal program
must follow.

PROGRAM
ProgramName;

VAR VariableName :
VariableType; VariableName : VariableType; …

PROCEDURE
ProcedureName;

variables here if necessary BEGIN

Some Code;

END;

FUNCTION
FunctionName(variableList): VariableType;

variables here if necessary

BEGINSome Code
if necessary; FunctionName := some expression More Code if
necessary;

END; … more functions and procedures if necessary …

BEGIN the main program block. It should be small and all
work should be delegated to the procedures and functions. It often
consists of a WHILE loop that calls in turn procedures and
functions in the appropriate order. END.

1
Technology 0 Answer 34 views 0

About the Author

Leave an answer

Captcha Click on image to update the captcha .

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>