What is Pascal?
Grade 11,  ICT

Pascal Programming (Part II)

A pascal program basically has the following sections:

  • Program name
  • Uses command
  • Type declarations
  • Constant declarations
  • Variables declarations
  • Functions declarations
  • Main program block
  • Statements and Expressions within each blocks
  • Comments

Below format shows the basic syntax of a Pascal program:

program [name of the program]
uses [comma delimited names of libraries uses]
cont [ global constant declaration block]
var [ global variable declaration block]
function {function declarations, if any}
{local variables}
procedure { procedure declarations, if any}
{local variables}
begin { main program block starts}
end.{ the end of main program block}

Leave a Reply

Your email address will not be published. Required fields are marked *

Online Testing System