Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
STANDART PASCAL ISO 1990.doc
Скачиваний:
5
Добавлен:
17.11.2019
Размер:
251.66 Кб
Скачать

6.1.4 Directives

A directive shall only occur in a procedure-declaration or a function-declaration. The only directive shall be the required directive forward (see 6.6.1 and 6.6.2). No directive shall have the same spelling as any word-symbol.

directive = letter { letter | digit } .

NOTE --- Many processors provide, as an extension, the directive external, which is used to specify that the procedure-block or function-block corresponding to that procedure-heading or function-heading is external to the program-block. Usually it is in a library in a form to be input to, or that has been produced by, the processor.

6.1.5 Numbers

An unsigned-integer shall denote in decimal notation a value of integer-type (see 6.4.2.2). An unsigned-real shall denote in decimal notation a value of real-type (see 6.4.2.2). The letter 'e' preceding a scale-factor shall mean times ten to the power of. The value denoted by an unsigned-integer shall be in the closed interval 0 to maxint (see 6.4.2.2 and 6.7.2.2).

signed-number = signed-integer | signed-real .

signed-real = [ sign ] unsigned-real .

signed-integer = [ sign ] unsigned-integer .

unsigned-number = unsigned-integer | unsigned-real .

sign = '+' | '-' .

unsigned-real= digit-sequence '.' fractional-part [ 'e' scale-factor] ½ digit-sequence 'e' scale-factor .

unsigned-integer = digit-sequence .

fractional-part = digit-sequence .

scale-factor = [ sign ] digit-sequence .

digit-sequence = digit { digit } .

Examples:

1e10

1

+100

-0.1

5e-3

87.35E+8

6.1.6 Labels

Labels shall be digit-sequences and shall be distinguished by their apparent integral values and shall be in the closed interval 0 to 9999. The spelling of a label shall be its apparent integral value.

label = digit-sequence .

6.1.7 Character-strings

A character-string containing a single string-element shall denote a value of the required char-type (see 6.4.2.2). A character-string containing more than one string-element shall denote a value of a string-type (see 6.4.3.2) with the same number of components as the character-string contains string-elements. All character-strings with a given number of components shall possess the same string-type.

There shall be an implementation-defined one-to-one correspondence between the set of alternatives from which string-elements are drawn and a subset of the values of the required char-type. The occurrence of a string-element in a character-string shall denote the occurrence of the corresponding value of char-type.

character-string = ''' string-element { string-element } ''' .

string-element = apostrophe-image | string-character .

apostrophe-image = '''' .

string-character = one-of-a-set-of-implementation-defined-characters .

NOTE --- Conventionally, the apostrophe-image is regarded as a substitute for the apostrophe character, which cannot be a string-character.

Examples:

'A'

';'

''''

'Pascal'

'THIS IS A STRING'

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]