Contents | Prev | Next | Index
Pascal requires every identifier occuring in a program to be either introduced by a declaration or to be imported. The only exception from this rule are the standard identifiers which can be regarded as automatically imported. Declarations also specify certain permanent properties of an item, such as whether it is a constant, type, variable or procedure. The identifier is then used to refer to the associated item.
The scope of an item extends textually from the point of its declaration to the end of the block. That is, it is local within its program, unit, procedure or record according to which its declaration belongs to. The visibility of an item also extends to nested scopes unless it is hidden there by another declaration of the same identifier. Here are the scope rules:
An identifier may be qualified. In this case it is prefixed by another identifier which designates the Pascal unit in which the qualified identifier is defined. The prefix and the identifier are separated by a period.
qualident ::= qualident . <identifier> ::= <identifier> |
Pascal also has a number of standard identifiers. These are automatically imported, as if a USES SYSTEM clause was specified. Though not being reserved words, standard identifiers should not be redeclared.
Contents | Prev | Next | Index
Canterbury Pascal for JVM (Last documentation update
Sep 02, 2004)
Copyright © 1999-2004 J.Neuhoff - mhccorp.com
. All rights reserved.
Please send any comments or corrections to
neuhoff@mhccorp.com