next up previous contents
Next: Commenting Up: Printing to the Output Previous: writeln   Contents

Adding More Statements

You can extend this program so it outputs multiple lines instead of one. For example, if I want the program to output my address, I can change the program as follows:

begin
  writeln('Tak Auyeung');
  writeln('999 Milky Way');
  writeln('Galaxy, UV 99999')
end.

I just changed the original writeln statement, and added two more writeln statements. Note that I use the semicolon (;) to separate the statements. In Pascal, a semicolon is used as a statement separator. This is why when I only had one statement, there was no need to use a semicolon.



Tak Auyeung 2003-12-03