BackForward
site MapHistorYCOmputer PartsNetworksDatabaseSHow It worksBiOGraPhYThe GameFOrUmCitationSThe CrewTerminologY DictionarY


PASCAL

 

Pascal is a high-level programming language that was developed by Swiss computer scientist Niklaus Wirth in 1971. It is named after the mathematician Blaise Pascal, who, in 1642, designed the first mechanical calculator to be produced and distributed.

Wirth developed Pascal to help teach the concepts of structured programming. He wanted to teach the "correct" way to write computer programs using various programming languages. Thus, Pascal was designed to teach good programming techniques. Because of this, Pascal became one of the most preferred languages to teach to beginners in computer programming. There were also many versions of Pascal for use in personal computers.


Format of a Pascal program:



The PROGRAM statement states the name of the program. Then, the actual instructions and main portions of the program are written between the BEGIN and END statements. There can be more than one statement contained within this body section. However, each separate statement must end with a semicolon.


Data Types:

There are four types of data in the Pascal programming language:



Operators:

In order for your computer to be able to perform mathematical computations, it needs to have certain instructions. In turn, there needs to be certain symbols to represent the basic mathematical operators, like addition, subtraction, etc. Here's a list of a few of the basic operators:

+ Addition
- Subtraction
* Multiplication
/ Division
DIV Division with only integers
MOD The remainder from integer division

As you know from math class, there needs to be an order of operations for mathematical computations. There must be some sort of rule as to which operations you perform first. Here's the order of operations for computations in the Pascal language:



Also, in every mathematical equation, there are always relational operators. These are used for comparing two expressions (for example, the equal sign, greater than or less than signs, etc.) Some Pascal relational operators:

< Less than
> Greater than
= Equal to
<> Not equal to
< = Less than or equal to
> = Greater than or equal to


Control Statements:

Pascal programs are controlled by certain control statements. They control which actions should be performed, how many times they should be performed, etc. Some basic control statements are:




Continue on to the next programming language:
C

BASIC|PASCAL|C|C++
Operating Systems|Programming Languages|Word processors|Spreadsheets|Computer Games|Video Software|Music Software
Hardware|Software

Cyber-Club sections:Site map|History|computer Parts|Networks|Databases|How it works|Biographies|The Game|interactive|Citations|Terminology Dictionary

1995-2001, ThinkQuest Inc.all rights reserved

TQ