Professional Documents
Culture Documents
By Daniel D'Agostino
Contents
Pascal Language Tutorial
Introduction to Pascal
Overview of the Programming Process
Basic Input and Output
The CRT Unit
Conditional Statements
Loops
File Handling
Subprograms
Data types
BGI Graphics
Pascal Reference
Index of Pascal Reserved Words
Index of CRT Colours
Index of Acronyms
Useful Links
Table of ASCII Codes
Tutorial Tree
designed to be platform-independent, making it more flexible, but also making it harder to write compilers for it on the various platforms it supported. ALGOL was
mostly abandoned by programmers, except to describe algorithms (hence the name, ALGOrithmic Language).
During the next decade, several computer scientists worked to develop ALGOL to improve it and eliminate its drawbacks. Among them was Dr. Niklaus Wirth of
the Swiss Federal Institute of Technology, who in 1971 published his specification of Pascal, a new high-level language named after Blaise Pascal, the 17thcentury mathematician and philosopher who in 1642 invented an adding and subtracting machine, i.e. one of the first forms of computer.
Nowadays, Pascal has mostly withered from the professional programming scene. However, although obsolete compared to the languages there are today,
Pascal is nowhere as forgotten as ALGOL, from which it was forged. Its syntax, mainly based on simple English, makes it very easy to understand, and thus
Pascal is mainly used nowadays to introduce students to programming.
Errors in Programming
There are three kinds of errors encountered when programming:
Syntax errors are errors in the code you write so that the compiler cannot understand your code, and the code will not compile. This usually involves
misspelling a command or forgetting a semicolon at the end of a statement.
Runtime or execution errors are errors halting the flow of the program after it is compiled and run. This usually happens when the wrong type of variable
is given in input (e.g. inputting text where an integer should be entered).
Convert webpages or entire websites to PDF - Use PDFmyURL!
Logical errors are errors in the sequence of instructions or in the methods of calculation which do not halt the program but produce the wrong results.
When any error is encountered, you will need to debug the program, finding and eliminating errors. The compiler will usually tell you the line in which the error
occurred, and it will also tell you what went wrong. That will help you find errors and fix them.
Comments
Any computer language allows you to write comments in your code, i.e. to make notes about what each part of the code does. This will not increase the size of
the output program, and is very useful. If you go back to look at your code after a long time, it will be very difficult to understand what you did; comments help you
to recognise what your code does.
There are two ways to write comments in Pascal:
{this is a comment}
(*
this is another comment
*)
Both methods work the same way and may be used on single or multiple lines alike. { or (* begins the comment, and } or *) ends it.
Output
The write() or writeln() functions are used to write text on the screen. The only difference between them is that writeln() skips a line after what it
displays, while write() keeps going on the same line.
To display text, put a text string in the brackets, enclosed by single quotes:
writeln('What is your favourite song?');
write('Nevermind. I do not want to know.');
You can use writeln to skip lines. Writing it without the brackets will skip a line without writing anything to the screen:
writeln;
The fact that text is enclosed in single quotes means that you cannot use an apostrophe within the string, or the string will end prematurely and give an error.
Write the apostrophe twice if you want to use it within the string:
write('It''s Raining!');
You may concatenate or join two separate strings within the write() or writeln() functions using a comma or plus sign. It is best to use the comma though,
because while the plus sign will concatenate text, it will add if you are writing a numeric variable.
Constants
In the space between the program name and the begin point go many important declarations about variables, constants and other things to be used by the
program. Among these are, of course, constants. These are numbers of text strings whose value never changes, but is simply used without changing.
Constants go in the const block, and have a value assigned to them using the 'equals' sign. They may later be used with write() or other functions.
program constdemo;
const
pi = 3.141592654;
e = 2.718281828;
begin
writeln('The value of pi is ',pi);
end.
Note that in the writeln() or write() functions, single quotes are only used to contain text. Numbers, constants, variables and other data types should not
Convert webpages or entire websites to PDF - Use PDFmyURL!
Variables
Variables are much like constants, with the difference that their value is subject to change.
Like constants, they are declared in the area between program and begin, and what you define is not their content but their type.
A Pascal variable can be of any of the following types:
integer - whole number within the range -32768x<32766
longint - larger integers
real - decimal numbers
char - a single character (requires quotes)
string - string of characters of variable length (up to 255 characters, requires quotes)
string[x] (where x is an integer less than or equal to 255) - fixed length string (requires quotes); string can be shorter than the specified character
length, but will be truncated to the first x characters if the string is longer
boolean - boolean values involving true and false values
Note that these data types can also be specified for constants:
const
users_age:integer=20;
pi
:real
=3.141592654
The following example demonstrates how to declare variales and use them in output.
program outputpi;
var
author_name:string[4];
pi
:real;
begin
author_name := 'John';
pi
:= 3.141592654;
write('Hi, my name is ', author_name, '!');
write('The value of pi is ', pi, '.');
end.
As you can see above, values are assigned to variables with the assignation operator (:=).
Convert webpages or entire websites to PDF - Use PDFmyURL!
Note that you can save space by declaring multiple variables of the same type on the same line, using a comma to separate them.
var
day, year, age : integer;
pi, e
: real;
name, month
: string;
Note also that you do not have to stay declaring or e. A predefined function for exists so all you have to do is write() it as follows. Another function exists
for e, which we will see later.
write(pi);
Input
The read() and readln() functions work for input pretty much like how write() and writeln() work for output. A variable is specified in the brackets, and
the user input is stored in that variable:
var name : string;
begin
writeln('What is your name?');
readln(name);
writeln('Pleased to meet you, ', name, '.');
end.
Note that if the program vanishes before showing you the final output, add another read statement to ask for input before ending the program.
With numerical input, you can have several numbers inputted at a time; the user will enter each number and press ENTER . This is done by entering multiple
variables in the read() or readln() function, separating them with commas. Here is a practical example of its use:
program average_of_three_numbers;
var x,y,z:integer;
begin
writeln('Please enter three numbers:');
readln(x,y,z);
writeln('Their average is ', ((x+y+z)/3));
end.
Arithmetic Operations
Convert webpages or entire websites to PDF - Use PDFmyURL!
Like any real programming language, Pascal can be used to perform arithmetic operations. There are several symbols involved; we have already seen the use of
the assignation operator (:=) and two of the arithmetic operations are shown in the previous example. These are the arithmetic operators available in Pascal:
Operator
Operation
Data type
Real/Integer
Real/Integer
Real/Integer
Real/Integer
Integer
Integer
Addition
Subtraction
Multiplication
Real Division
Integer Division
Modulus (Remainder)
+
*
/
div
mod
Example
5+3
15-6
4*5
2.2/1.1
81 div 9
5 mod 2
Answer to Example
8
9
20
2.0000000000E+00
9
1
The first three operators should be very straightforward. The Real Division (/) divides two numbers and gives the answer as a decimal, irrespective of whether
they were integers or decimals. The Integer Division (div), on the other hand, is used to divide two integers and gives the answer as an integer. The Modulus
(mod) operator returns the remainder of the division of two numbers.
You may use brackets to perform some operations before others. The following example illustrates the use of arithmetic operations within a program.
program tracknums;
var a,b,c:integer;
begin
a :=
c :=
b :=
a :=
c :=
end.
3;
(5*a);
(c-a);
(c mod b);
((c div 5) + (b-9));
{a=3,
{a=3,
{a=3,
{a=0,
{a=0,
b=0,
b=0,
b=12,
b=12,
b=12,
c=0 }
c=15}
c=15}
c=15}
c=6 }
Note that if you are outputting numbers which are to undergo arithmetical operations, putting the operations in brackets in the writeln() function is just as good
as using the assignation operator:
a := 5;
b := (a+5);
writeln(b);
{b=10}
a:=5;
writeln((a+5));
{10 is written}
Ordinal Functions
Convert webpages or entire websites to PDF - Use PDFmyURL!
integer and char are called ordinal data types. Each integer or character has another before it (predecessor) and another after it (successor). For example,
the successor of 'a' is 'b' and the predecessor of 20 is 19.
For the purpose of finding these predecessors and successors, you may use the following functions:
Function
Description
Examples
chr()
chr(97);
chr(43);
chr(234);
ord()
Displays the ordinal value of the specified character or integer. In the case of integers, the integer itself is returned. In the
case of characters, the corresponding ASCII value is returned.
ord(5);
ord('a');
ord(25);
ord('r');
Output of
Examples
a
+
5
97
25
114
pred(39); 38
pred('b'); a
succ(8);
9
succ('x'); y
Parameter
angle in radians
angle in radians
angle in radians
exp()
ln()
sqr()
number
positive number
number
General Output
sin x
cos x
tan-1 x
ex
ln x
x2
Example
sin(pi);
cos(pi);
arctan(0);
0
-1
0
Result
exp(1);
ln(exp(1));
sqr(-5);
2.7182818285E+00
1.0000000000E+00
25
positive number
number
number
number
sqrt()
round()
trunc()
abs()
x
x rounded to nearest integer
x rounded down to previous integer
|x|
sqrt(390625);
round(2.7);
trunc(2.7);
abs(-5);
625
3
2
5
Random Numbers
It is often necessary to generate random numbers, especially when games are involved. To generate random numbers, first initialise the generation of random
numbers using the randomize function, then use the random() function to generate a random number between zero and one less than the parameter of
random(), i.e. if the parameter is n, then the range in which the generated random number lies is 0x<n and it is between zero and (n-1).
program guessnum;
var a,b:integer;
begin
randomize;
a:=(random(6)+1); {random number between 1 and 6}
writeln('Random number generated: ',a);
readln;
end.
Delaying
The delay() function will cause the program to wait for s milliseconds between one command and the next, where s is the parameter of the delay() function:
delay(3000); {Wait for 3000 milliseconds (3 seconds)}
Convert webpages or entire websites to PDF - Use PDFmyURL!
Reading keypresses
readkey is a kind of variable that is given a value when a key is pressed.
uses crt;
var c:char;
begin
c := readkey;
writeln(c);
end.
When the user presses a key, the corresponding ASCII value of that key is passed to readkey, and is then assigned to the character variable we declared
earlier. When we write it, the ASCII value is converted back to character format and written to the screen.
halt;
halt(1);
Note that halt does not require the CRT unit to work.
Sounds
With the CRT Unit, you can play with sounds. Not complex sound and breathtaking music, but simple DOS beeps. You just have to use the sound() function
with a frequency as its parameter, delay() the sound for a number of milliseconds specified as its parameter, and then use nosound to end the sound
(otherwise it will continue beeping until you close the compiler).
It's fun. I tried making the 'Ready, get set, go' beeps they used to do in old racing games:
program racesnd;
uses crt;
begin
sound(100); delay(200); nosound;
delay(1000);
sound(100); delay(200); nosound;
delay(1000);
sound(400); delay(400); nosound;
readln;
end.
Conditional Statements
If
The if statement allows you to determine the program's next course of action depending on whether one or more conditions are true.
Imagine the program asks the user for his age, and displays a message depending on what he entered. If his age is zero, then write "Are you sure?" If the age is
between 0 and 40, then write "You're still young!" Otherwise, write "You're really old!"
program askage;
var age, absage:integer;
Convert webpages or entire websites to PDF - Use PDFmyURL!
begin
writeln('Enter your age below.');
readln(age);
absage := abs(age); {To handle negative age values}
if (absage=0) then writeln('Are you sure?');
else if ((absage > 0) and (absage < 40))
then writeln('You''re still young!')
else writeln('You''re really old!');
readln;
end.
You should think of the conditional statement as one big command, so that a semicolon is only used to end it all in the final else statement, and not the
statements after each then.
Each single if statement as it is only accepts one command. If we were to use other commands besides writeln(), you would need to have a begin..end
block enclosing them.
if (absage=0) then
begin
writeln('Are you sure?');
writeln('Enter your age again');
readln(age)
end;
Note that in this case, each statement except the last one in the begin..end block uses a semiconol, and a semicolon after end ends the block of commands.
This end ends with a semicolon because it is only ending a block of commands. The end that ends with a full stop only ends like that because it is ending the
whole program.
Logical/Comparative Operators
As we have seen, commands are executed depending on whether a condition is true. The condition usually depends on whether one or more variables are equal
to a given value (like absage = 0) or within a given range (like absage > 39). The variable, in each case, is compared with the given value using a logical
operator.
The following logical operators may be used:
Operator
<
>
<=
Description
is less than
is greater than
is less than or equal to
>=
=
<>
Note that the logical operator = is different from the assignation operator :=. One of the most common mistakes in every programming language (apart from
forgetting semicolons) is to mistake one for the other. := is used to assign a value to a variable; = compares a given value with that of a variable.
Boolean Operators
Four other boolean operators may be used to check whether a condition is true. They may be used to join multiple conditions or invert a condition, and the
conditions they are associated with depend on whether the variable matches the specified value. In the following examples, numbers are used instead of
variables to make things clearer.
not - returns true if the condition is false,e.g.
not (6>3) returns FALSE
not (5=3) returns TRUE
and returns true if both conditions are true, e.g.
(7>5) and (4<6) returns TRUE
(4<6) and (5<3) returns FALSE
or returns true if at least one condition is true, e.g.
(2<3) or (5<1) returns TRUE
(4<5) or (6<7) returns TRUE
xor (exclusive 'or') returns true if one condition is true and the other is false, e.g.
(1<2) xor (3<4) returns FALSE
(2<3) xor (5<1) returns TRUE
(13<10) xor (4<1) returns FALSE
program askage2;
var mage, fage : integer;
begin
writeln('Enter your mother''s age below.');
readln(mage);
mage := abs(mage);
writeln('Now enter your father''s age.');
readln(fage);
fage := abs(fage);
if ((fage<20) and (mage<20)) then
writeln('Your parents are both really young.');
Convert webpages or entire websites to PDF - Use PDFmyURL!
Case
Using the if statement can sometimes be cumbersome, especially if there are lots of different possivilities of output for each instance of the variable.
The case statement is much neater in such cases, as it lists instructions for each instance or range of the variable. Its general syntax is:
case variable of
instance1 : instruction1;
instance2 : instruction2;
else default_instruction;
end;
Here's an example of its use:
var mark:integer;
begin
writeln('What was your Physics mark?');
readln(mark);
case mark of
0:
writeln('Hopeless!');
1..19: writeln('You''re serious?');
20..39: writeln('That''s a bad fail.');
40..49: writeln('You failed, but it was close.');
50:
writeln('You just passed!');
51..59: writeln('You got a D.');
60..69: writeln('You got a C.');
70..79: writeln('Well done! That''s a B.');
80..99: writeln('Excellent!');
100:
writeln('Perfect!');
else writeln('Huh?');
end;
readln;
end.
There are three ways to specify values in the case statement:
Convert webpages or entire websites to PDF - Use PDFmyURL!
Loops
Sometimes it is necessary to repeat a command for a number of times. This is called looping, and there are three kinds of loop.
File Handling
To read from or write to text files, there are four main things you need to do:
1. assign() a text file to a variable.
Convert webpages or entire websites to PDF - Use PDFmyURL!
2. Open the text file in a specific mode, depending on whether and how you want to read/write.
3. Read/write file.
4. close() the file.
So you first need to declare a variable of type text. This is a special data type purposely used for text files. You will be directly using this variable when opening,
reading/writing and closing the file.
var datafile:text;
Once your variable is declared, use the assign() function to associate your variable with a specific file. This function takes two parameters; the first is the
variable and the second is the name of the file.
assign(datafile,'data.txt');
Okay, so the first step is done. The next thing to do is decide what you are going to do with the file, because you will be using a different function depending on
that (for all three functions the parameter is the file variable):
reset() opens the file for reading.
rewrite() opens the file for writing; all contents of the file are erased and new stuff is written. If the file does not exist, it will be created.
append() opens the file for writing; new content is added to the end of the file and the original contents of the file are not lost.
After using one of these functions to open the file in a specific mode, you will want to do whatever you planned to do with the file (read/write data). This is done
using the same functions you used for writing text to the screen (read(), readln(), write() and writeln()), with the only difference that as a first
parameter they will take the file variable. Note also that reading functions can only be used if the file was opened with reset(), and writing functions can only be
used if either rewrite() or append() was used.
write(datafile,'Hello!');
Once you're done, you need to close() the file. Here's a full example.
program email_address_book;
uses crt;
var datafile:text;
counter:integer;
name,email:string;
begin;
clrscr;
assign(datafile,'data.txt');
rewrite(datafile);
Convert webpages or entire websites to PDF - Use PDFmyURL!
for counter:=1 to 3 do
begin;
{user inputs data}
writeln('Enter name ',counter,' out of 3');
readln(name);
writeln('Enter that person''s email.');
readln(email);
{data is written to file}
writeln(datafile,name);
writeln(datafile,email);
end;
close(datafile);
end.
This program asks you to input 3 people's name and email address. These are written to a file in successive lines. Organising them by line makes it easier to
read them, as you can read by line too. Note that since rewrite() is used, the contents of the data file are erased and replaced with new data. If you want to
read the entries, you can use the following example program.
program readfile;
var datafile:text;
counter:integer;
line:string;
begin;
assign(datafile,'data.txt');
reset(datafile);
for counter:=1 to 3 do
begin;
readln(datafile,line);
writeln('Name ',counter,': ',line);
readln(datafile,line);
writeln('Email ',counter,': ',line);
writeln;
end;
close(datafile);
end.
two constant values (line 1 and 3 above) is useless. Instead, you can read line by line until you reach the end of the file, which is where the eof() (end of file)
function returns true. The example program below is a rewrite of the program above, using the eof() function.
program readfile2;
var datafile:text;
line:string;
linecounter:integer;
begin;
assign(datafile,'data.txt');
reset(datafile);
linecounter := 1;
while eof(datafile) = false do
begin;
readln(datafile,line);
linecounter := linecounter + 1;
{Odd-numbered lines are names; even-numbered lines are addresses}
if ((linecounter mod 2) = 0) then
write('Name ')
else
write('Email ');
{Write line number followed by the actual name/email}
writeln((linecounter div 2),': ',line);
{Skip a line after each email}
if ((linecounter mod 2) = 1) then
writeln;
end;
close(datafile);
readln;
end.
var thefile:text;
filechar:char;
begin;
clrscr;
assign(thefile,'file.txt');
reset(thefile);
while eoln(thefile) = false do
begin;
read(thefile,filechar);
write(filechar);
end;
close(thefile);
readln;
end.
file.txt
This line will be read.
This line, on the other hand, will not.
Subprograms
In a program, there are several lines of code you might want to use more than once. Simply copying and pasting that code will bloat your source code, making it
harder to develop the program. Code that needs to be reused may be written in subprograms (which are functions and procedures). Calling the required
function/procedure will execute the necessary instructions, and save copying and pasting lots of lines of code.
Procedures
If all you want is to execute multiple instructions in a given order, the subprogram you need to use is the procedure. A procedure may have its own variables and
constants, and consists of a begin..end block, which is where you put the instructions you want. Note that any variables or constants belonging to the
subprogram are not available in the program's main begin..end block - variables (and constants) are restricted to a particular scope (the particular
subprogram, loop or main program). Any subprogram must be defined at the beginning of a program before they can be used, and this is how it is done (in
general):
procedure Proc_Name
const
{constants go here}
var
Convert webpages or entire websites to PDF - Use PDFmyURL!
{variables go here}
begin;
{do something}
end;
The definition goes before the main begin..end block. Proc_Name can be any name you choose for the procedure. Later, in the main program, you use the
procedure by writing this name, followed by a semicolon, as shown below. Note that a procedure definition can consist of just the begin..end block, as the
sections for constants and variables may be omitted if empty.
Proc_Name;
Parameters
Variables from the main program flow (which are otherwise not accessible by the subprogram because they are outside its scope) may be used in a subprogram
by passing them as parameters. This is done by listing the variables used within brackets after the name of the subprogram. Multiple variables of the same type
are separated by commas, and different variable types are separated by semicolons. The following is a sample program using a procedure and a couple of
parameters.
program dlg;
uses crt;
procedure talk(speaker:integer; dialogue:string);
begin;
textcolor(speaker);
if (speaker = 1) then
write('Shopkeeper')
else if (speaker = 2) then
write('Joe Black ');
write(': ');
textcolor(7);
writeln(dialogue);
writeln;
end;
begin;
clrscr;
writeln('Fictional dialogue.');
writeln;
writeln('-----');
writeln;
talk(1,'Good morning, sir. May I help you?');
Convert webpages or entire websites to PDF - Use PDFmyURL!
Functions
Functions are like procedures, but they return a value that can be used within the main program. This means that they are not just used to carry out instructions,
as procedures are, but they are used to manipulate data and return it for use within the main program flow. Like procedures, they can take constants, variables
and parameters. The only difference in definition is that the function name (or the parameters, if any) must be followed by the type of data that the function will
return.
The following is an example of the classic function to multiply two numbers. Of course, here the use of the function could easily be replaced by just using a*b
within the writeln, but this is just to show you how it works.
program multiply_test;
var a,b:integer;
function multiply(x,y:integer):integer;
begin;
multiply := x*y;
end;
begin;
writeln('Enter the numbers you want to multiply.');
readln(a,b);
writeln(a,' x ',b,' = ',multiply(a,b));
readln;
end.
As you can see, the function is assigned a value which is later used in the main program. Since the function consists of a value, calling it on its own like a
procedure would do nothing (even though code can be added to the function to write the value, or whatever is needed). Instead, this value is used with another
function (in this case writeln) to show the data it represents.
Subprogram techniques
Following are a few things you should know if you want to use subprograms properly in your programs.
Convert webpages or entire websites to PDF - Use PDFmyURL!
Let's say you have two procedures, defined one after another. If you wanted both procedures to call each other, this would not be possible. The first procedure
cannot call the second procedure, which is defined later. The solution is to declare your subprograms before they are defined, like this:
procedure First_Procedure; forward;
procedure Second_Procedure; forward;
As you can see, declaration involves writing the first line of your definition (including the procedure keyword, subprogram name and any parameters; followed
by the forward keyword. This is called forward referencing.
Note that apart from calling other subprograms, subprograms may also call themselves. However, if this is done, it should be restricted by the condition of a loop.
Otherwise, the subprogram would call itself infinitely, causing an infinite loop.
Data types
BGI Graphics
Pascal Reference
Index of Pascal Reserved Words
There is a set of reserved words in Pascal that cannot be used as identifiers, i.e. you cannot name variables, constants, functions, etc. with the name of these
reserved words. You will notice if a word is reserved because it will display in white rather than the normal yellow.
Reserved Word
and
asm
array
begin
case
const
constructor
destructor
div
do
downto
else
Use
Boolean Operator
Arithmetic Operator
Performs the commands in Loops
Counts down in for..do loops
"Otherwise" command in Conditional Statements
else
end
exports
file
for
function
goto
if
implementation
in
inherited
inline
interface
label
library
mod
nil
not
object
of
or
packed
procedure
program
record
repeat
set
shl
shr
string
then
to
type
unit
until
uses
var
Loop
Conditional Statement
Arithmetic Operator
Boolean Operator
Specifies each case of a case statement
Boolean Operator
Loop
while
with
xor
Boolean Operator
Sample
Name
black
blue
green
cyan
red
magenta
brown
lightgray
darkgray
lightblue
lightgreen
lightcyan
lightred
lightmagenta
yellow
white
begin;
textcolor(counter);
writeln(counter);
end;
readln;
end.
Index of Acronyms
Acronym
Full Term
ALGOL Algorithmic Language
American Standard for Character
ASCII
Information Interchange
BGI
Borland Graphical Interface
CRT
Cathode Ray Tube
Description
High-level language developed in the late 1950s by a committee led by Peter Naur (see Introduction to Pascal)
The ASCII Codes are numbers corresponding to a character. See Table of ASCII Codes for a list or Ordinal
Functions for the chr() function which displays ASCII codes
The Pascal graphics library provided by Borland.
The Cathode Ray Tube is what makes a monitor or screen. Look it up in a Physics book to see how it works.
Useful Links
Learn Pascal - good as a Pascal reference, though not detailed enough to serve as a tutorial
Roby's Programming Tutorial - goes into the complex parts of Pascal, not for beginners
Pascal Programming - tutorial by a Maltese student, not very user-friendly but can be a good tutorial for beginners
Blaise Pascal - about the mathematician after who the language is named
Tutorial Tree
Pascal Language Tutorial
Introduction to Pascal
Overview of the Programming Process
The Compiler
Errors in Programming
Comments
Basic Input and Output
Convert webpages or entire websites to PDF - Use PDFmyURL!
Output
Constants
Variables
Input
Arithmetic Operations
Ordinal Functions
Advanced Mathematical Functions
Random Numbers
Setting Output Width
The CRT Unit
Functions of the CRT Unit
Clearing the screen
Text Colour and Background Colour
Going to a specified (x,y) coordinate in output
Delaying
Changing text size
Reading keypresses
Halting program flow
Sounds
Conditional Statements
If
Logical/Comparative Operators
Boolean Operators
Case
Loops
The for..do Loop
The while..do Loop
The repeat..until Loop
File Handling
The eof() function
The eoln() function
Subprograms
Procedures
Parameters
Functions
Subprogram techniques
Data types
BGI Graphics
Pascal Reference
Index of Pascal Reserved Words
Index of CRT Colours
Index of Acronyms
Useful Links
Convert webpages or entire websites to PDF - Use PDFmyURL!