Introduction
PASCAL is a programming language named after the 17th century
mathematican Blaise Pascal. Pascal
Basic format of every Pascal program
Every Pascal program has the same essential format, which is
illustrated below,
program TITLE ( input, output ); begin program statements; program statement end.program is the first word of all Pascal programs. It is a keyword (Keywords are reserved, ie, you cannot use keywords to describe variables).
TITLE is the name the programmer gives to the Pascal program
being written.
It is an identifier. Identifiers begin with a
letter, then followed by any digit, letter or the underscore character
( _ ).
birthday Too_hot? First_Initial grade 1stprogram down.to.earth see you OldName case Click here for answers(input, output) states what the program will do, ie, input and/or output data. Data is inputted from the keyboard, and outputted to the console screen.
begin defines the starting point of the program, and provides a means of grouping statements together (ie all statements between a begin and end are considered part of the same group or block).
program statements are commands or instructions to the computer which perform various tasks.
end. This must always be the final statement of a Pascal program.
ALL PROGRAM STATEMENTS AND LINES ARE TERMINATED WITH A SEMI-COLON, EXCEPT THE BEGIN AND END KEYWORDS. PROGRAM STATEMENTS PRECEEDING AN END STATEMENT DO NOT REQUIRE A SEMI-COLON.