Difference between revisions of "Standard Pascal"

From Free Pascal wiki
Jump to navigationJump to search
(full keyword list)
(special-symbols)
Line 1: Line 1:
 
{{Standard_Pascal}}
 
{{Standard_Pascal}}
  
In 1974, the creator of the [[Pascal]] language, [[Niklaus Wirth]] wrote a book with Kathleen Jensen, titled ''Pascal User Manual and Report'' published by Springer-Verlag. This book became a de-facto standard for the Pascal language. In 1982 the International Standards Organization (ISO) formalized the de-facto standard as ISO 7185. The ISO 7185 standard is referred to as '''Standard Pascal'''. In 1990 ISO released an updated version - ISO 7185 :1990 - that didn't introduce any new concepts, but cleared up ambiguities and corrected errors that were in the earlier version. The standard defines the minimum level that a [[Compiler|Pascal compiler]] must support in order to be a true compiler of the Pascal language.  The following are the standard [[Keyword|keywords]] (referred to as word-symbols in the ISO 7185) that all compilers must support:  
+
In 1974, the creator of the [[Pascal]] language, [[Niklaus Wirth]] wrote a book with Kathleen Jensen, titled ''Pascal User Manual and Report'' published by Springer-Verlag. This book became a de-facto standard for the Pascal language. In 1982 the International Standards Organization (ISO) formalized the de-facto standard as ISO 7185. The ISO 7185 standard is referred to as '''Standard Pascal'''. In 1990 ISO released an updated version - ISO 7185 :1990 - that didn't introduce any new concepts, but cleared up ambiguities and corrected errors that were in the earlier version. The standard defines the minimum level that a [[Compiler|Pascal compiler]] must support in order to be a true compiler of the Pascal language.   
 +
 
 +
 
 +
== Reserved Words ==
 +
The following are the standard [[Keyword|keywords]] (referred to as word-symbols in the ISO 7185) that all compilers must support:  
  
 
* and  
 
* and  
Line 39: Line 43:
 
* with
 
* with
  
 +
== Symbols ==
 +
The following symbols (which the standard refers to as special-symbols) are also part of the language:
  
The following symbols are also part of the language:
+
* +
 
+
* ~
:<nowiki>:=</nowiki> ([[Becomes|becomes]]) &middot; = ([[Equal|equal]]) &middot; > ([[Greater than|greater than]]) &middot; < ([[Less than|less than]]) <> ([[Not equal|not equal]])
+
* *
 +
* /
 +
* = ([[Equal|equal]])  
 +
* < ([[Less than|less than]])
 +
* > ([[Greater than|greater than]])
 +
* [
 +
* ]
 +
* .
 +
* ,
 +
* :
 +
* ;  
 +
* "
 +
* (
 +
* )
 +
* <> ([[Not equal|not equal]])
 +
* <=
 +
* >=
 +
* := (named [[Becomes|becomes]])
 +
* ..
  
 +
== Extensions ==
 
There are additional keywords which are not technically part of the Standard Pascal language but are used by [[FPC]] either for additional functionality such as for implementing objects, compatibility with the error recovery concepts exposed by C++, or to provide compatibility with [[Borland Pascal]] and earlier Pascal compilers.  These keywords include:
 
There are additional keywords which are not technically part of the Standard Pascal language but are used by [[FPC]] either for additional functionality such as for implementing objects, compatibility with the error recovery concepts exposed by C++, or to provide compatibility with [[Borland Pascal]] and earlier Pascal compilers.  These keywords include:
  

Revision as of 11:16, 21 July 2016

العربية (ar) Deutsch (de) English (en) español (es) suomi (fi) français (fr) Bahasa Indonesia (id) 日本語 (ja) português (pt) русский (ru) 中文(中国大陆)‎ (zh_CN)

In 1974, the creator of the Pascal language, Niklaus Wirth wrote a book with Kathleen Jensen, titled Pascal User Manual and Report published by Springer-Verlag. This book became a de-facto standard for the Pascal language. In 1982 the International Standards Organization (ISO) formalized the de-facto standard as ISO 7185. The ISO 7185 standard is referred to as Standard Pascal. In 1990 ISO released an updated version - ISO 7185 :1990 - that didn't introduce any new concepts, but cleared up ambiguities and corrected errors that were in the earlier version. The standard defines the minimum level that a Pascal compiler must support in order to be a true compiler of the Pascal language.


Reserved Words

The following are the standard keywords (referred to as word-symbols in the ISO 7185) that all compilers must support:

Symbols

The following symbols (which the standard refers to as special-symbols) are also part of the language:

Extensions

There are additional keywords which are not technically part of the Standard Pascal language but are used by FPC either for additional functionality such as for implementing objects, compatibility with the error recovery concepts exposed by C++, or to provide compatibility with Borland Pascal and earlier Pascal compilers. These keywords include:

implementation · finally · try · unit.

Types

There are the standard types:

integer · smallint · longint · real · boolean · string · char · byte

Modes supported by Free Pascal

Free Pascal supports ISO 7185 Standard Pascal with the compiler mode option -Miso and ISO/IEC 10206 Extended Pascal with -Mextendedpascal. Support of ISO 7185 started with version 3.0.0.

External links