Changes

Jump to navigation Jump to search
Description section
Line 1: Line 1:  
'''Pascal''' is a [[computer]] [[programming]] [[language]] created by Prof. Nicholas Wirth in 1970.  It became widely popular with the release of Borland's Turbo Pascal, an integrated editor and compiler for Pascal on [[MSDOS]], in 1981.  Pascal was eventually made an ISO standard (ISO 7185).
 
'''Pascal''' is a [[computer]] [[programming]] [[language]] created by Prof. Nicholas Wirth in 1970.  It became widely popular with the release of Borland's Turbo Pascal, an integrated editor and compiler for Pascal on [[MSDOS]], in 1981.  Pascal was eventually made an ISO standard (ISO 7185).
 +
 +
== Description ==
 +
Pascal uses a series of ''statements'', which, like [[BASIC]], are English-like words.
 +
Statements can wrap onto multiple lines, and each statement is terminated by a semi-colon or the reserved word '''end'''.
 +
 +
Statements may be simple or compound.
 +
A simple assignment statement is:
 +
 +
{{tt|1=a:=3;}}
 +
 +
A loop statement that appends characters to a string might look like the following:
 +
 +
{{tt|1=for i:=1 to 6 do s:=s+' more';}}
 +
 +
The {{tt|for}} statement executes the assignment statement each time through the loop.
 +
If the loop is to execute more than one statement, they are incorporated into a compound statement, bracketed by {{tt|begin}} and {{tt|end}} reserved words:
 +
<code>
 +
  for i:=1 to 6 do
 +
  begin
 +
    s:=s+' more';
 +
    count:=count+1;
 +
    y:=y-3;
 +
  end;
 +
</code>
    
==Technical Summary==
 
==Technical Summary==
nsTeam2RO, nsTeam2RW, nsTeam2_talkRO, nsTeam2_talkRW
13,254

edits

Navigation menu