As you've seen in the earlier chapter, Pascal programs have a standard structure which looks like the following: Program program_name; { Global variables } Var A_Variable: Variable_Type; { Other functions/procedures } Procedure SayHello; { Local variables } Var T : String; Begin { Redundant code to illustrate the use of local variables in a procedure } T := 'Hello'; Writeln(T); End; { Main function } Begin { Do something } SayHello; End. A program has a program header, followed by global variable definitions, procedure or function definitions and finally the main function.
Identifier (URI) | Rank |
---|---|
dbkwik:resource/oKIjGEX5P6tZsavOmdgo-g== | 5.88129e-14 |