0                                                                         00000100     
1                                                                         00000200     
2                                                                         00000300     
3                                                                         00000400     
4                               DP7185                             PAGE  100000500     
5                                                                         00000600     
6                                                                         00000700     
7                                                                         00000800     
8   CONTENTS                                            PAGE              00000900     
9   --------                                            ----              00001000     
10                                                                         00001100     
11                                                                         00001200     
12   Foreword                                              5               00001300     
13   0. Introduction                                       6               00001400     
14   1. Scope of this standard                             7               00001500     
15   2. References                                         8               00001600     
16   3. Definitions                                        9               00001700     
17   4. Definitional conventions                          10               00001800     
18   5. Compliance                                        12               00001900     
19                                                                         00002000     
20      5.1 Processors                                    12               00002100     
21      5.2 Programs                                      13               00002200     
22                                                                         00002300     
23   6. Requirements                                      14               00002400     
24                                                                         00002500     
25      6.1 Lexical tokens                                14               00002600     
26                                                                         00002700     
27          6.1.1 General                                 14               00002800     
28          6.1.2 Special symbols                         14               00002900     
29          6.1.3 Identifiers                             15               00003000     
30          6.1.4 Directives                              15               00003100     
31          6.1.5 Numbers                                 16               00003200     
32          6.1.6 Labels                                  16               00003300     
33          6.1.7 Character-strings                       16               00003400     
34          6.1.8 Token separators                        17               00003500     
35                                                                         00003600     
36   6.2 Blocks , scope, and activations                  18               00003700     
37                                                                         00003800     
38       6.2.1 Block                                      18               00003900     
39       6.2.2 Scope                                      19               00004000     
40       6.2.3 Activations                                20               00004100     
41                                                                         00004200     
42   6.3 Constant-definitions                             21               00004300     
43   6.4 Type-definitions                                 22               00004400     
44                                                                         00004500     
45       6.4.1 General                                    22               00004600     
46       6.4.2 Simple types                               23               00004700     
47                                                                         00004800     
48             6.4.2.1 General                            23               00004900     
49             6.4.2.2 Required simple-types              23               00005000     
50             6.4.2.3 Enumerated-types                   25               00005100     
51             6.4.2.4 Subrange-types                     25               00005200     
52                                                                         00005300     
53       6.4.3 Structured-types                           26               00005400     
54                                                                         00005500     
55             6.4.3.1 General                            26               00005600     
56             6.4.3.2 Array-types                        27               00005700     
57             6.4.3.3 Record-types                       28               00005800     
58             6.4.3.4 Set-types                          32               00005900     
59             6.4.3.5 File-types                         32               00006000     
60                                                                         00006100     
61                                                                         00006200     
62                                                                         00006300     
63                                                                         00006400     
64                               DP7185                             PAGE  200006500     
65                                                                         00006600     
66                                                                         00006700     
67                                                                         00006800     
68       6.4.4 Pointer-types                              35               00006900     
69       6.4.5 Compatible types                           36               00007000     
70       6.4.6 Assignment-compatibility                   36               00007100     
71       Example of a type definition-part                37               00007200     
72                                                                         00007300     
73   6.5 Declarations and denotations of variables        38               00007400     
74                                                                         00007500     
75       6.5.1 Variable-declarations                      38               00007600     
76       6.5.2 Entire-variables                           40               00007700     
77       6.5.3 Component-variables                        40               00007800     
78                                                                         00007900     
79             6.5.3.1 General                            40               00008000     
80             6.5.3.2 Indexed-variables                  41               00008100     
81             6.5.3.3 Field-designators                  42               00008200     
82                                                                         00008300     
83       6.5.4 Identified-variables                       43               00008400     
84       6.5.5 Buffer-variables                           43               00008500     
85                                                                         00008600     
86   6.6 Procedure and function declarations              44               00008700     
87                                                                         00008800     
88       6.6.1 Procedure-declarations                     44               00008900     
89       6.6.2 Function-declarations                      47               00009000     
90       6.6.3 Parameters                                 49               00009100     
91                                                                         00009200     
92             6.6.3.1 General                            49               00009300     
93             6.6.3.2 Value parameters                   51               00009400     
94             6.6.3.3 Variable parameters                51               00009500     
95             6.6.3.4 Procedural parameters              51               00009600     
96             6.6.3.5 Functional parameters              52               00009700     
97             6.6.3.6 Parameter list congruity           52               00009800     
98             6.6.3.7 Conformant array parameters        53               00009900     
99             6.6.3.8 Conformability                     56               00010000     
100                                                                         00010100     
101       6.6.4 Required procedures and functions          58               00010200     
102                                                                         00010300     
103             6.6.4.1 General                            58               00010400     
104                                                                         00010500     
105       6.6.5 Required procedures                        58               00010600     
106                                                                         00010700     
107             6.6.5.1 General                            58               00010800     
108             6.6.5.2 File handling procedures           58               00010900     
109             6.6.5.3 Dynamic allocation procedures      61               00011000     
110             6.6.5.4 Transfer procedures                62               00011100     
111                                                                         00011200     
112       6.6.6 Required functions                         63               00011300     
113                                                                         00011400     
114             6.6.6.1 General                            63               00011500     
115             6.6.6.2 Arithmetic functions               63               00011600     
116             6.6.6.3 Transfer functions                 64               00011700     
117             6.6.6.4 Ordinal functions                  65               00011800     
118             6.6.6.5 Boolean functions                  65               00011900     
119                                                                         00012000     
120                                                                         00012100     
121                                                                         00012200     
122                                                                         00012300     
123                                                                         00012400     
124                               DP7185                             PAGE  300012500     
125                                                                         00012600     
126                                                                         00012700     
127                                                                         00012800     
128   6.7 Expressions                                      66               00012900     
129                                                                         00013000     
130       6.7.1 General                                    66               00013100     
131       6.7.2 Operators                                  68               00013200     
132                                                                         00013300     
133             6.7.2.1 General                            68               00013400     
134             6.7.2.2 Arithmetic operators               69               00013500     
135             6.7.2.3 Boolean operators                  71               00013600     
136             6.7.2.4 Set operators                      71               00013700     
137             6.7.2.5 Relational operators               72               00013800     
138                                                                         00013900     
139       6.7.3 Function designators                       73               00014000     
140                                                                         00014100     
141   6.8 Statements                                       74               00014200     
142                                                                         00014300     
143       6.8.1 General                                    74               00014400     
144       6.8.2 Simple-statements                          75               00014500     
145                                                                         00014600     
146             6.8.2.1 General                            75               00014700     
147             6.8.2.2 Assignment-statements              75               00014800     
148             6.8.2.3 Procedure-statements               76               00014900     
149             6.8.2.4 Goto-statements                    77               00015000     
150                                                                         00015100     
151       6.8.3 Structured-statements                      77               00015200     
152                                                                         00015300     
153             6.8.3.1 General                            77               00015400     
154             6.8.3.2 Compound-statements                78               00015500     
155             6.8.3.3 Conditional-statements             78               00015600     
156             6.8.3.4 If-statements                      78               00015700     
157             6.8.3.5 Case-statements                    79               00015800     
158             6.8.3.6 Repetitive-statements              80               00015900     
159             6.8.3.7 Repeat-statements                  80               00016000     
160             6.8.3.8 While statements                   80               00016100     
161             6.8.3.9 For-statements                     81               00016200     
162             6.8.3.10 With-statements                   83               00016300     
163                                                                         00016400     
164   6.9 Input and output                                 85               00016500     
165                                                                         00016600     
166       6.9.1 General                                    85               00016700     
167       6.9.2 The procedure read                         85               00016800     
168       6.9.3 The procedure readln                       86               00016900     
169       6.9.4 The procedure write                        87               00017000     
170                                                                         00017100     
171             6.9.4.1 Multiple parameters                88               00017200     
172             6.9.4.2 Write-parameters                   88               00017300     
173                                                                         00017400     
174             6.9.4.3 Char-type                          89               00017500     
175             6.9.4.4 Integer-type                       89               00017600     
176             6.9.4.5 Real-type                          90               00017700     
177                                                                         00017800     
178                     6.9.4.5.1 The floating-point       90               00017900     
179                               representation                            00018000     
180                                                                         00018100     
181                                                                         00018200     
182                                                                         00018300     
183                                                                         00018400     
184                               DP7185                             PAGE  400018500     
185                                                                         00018600     
186                                                                         00018700     
187                                                                         00018800     
188                     6.9.4.5.2 The fixed-point          91               00018900     
189                               representation                            00019000     
190                                                                         00019100     
191             6.9.4.6 Boolean-type                       93               00019200     
192             6.9.4.7 String-types                       93               00019300     
193                                                                         00019400     
194       6.9.5 The procedure writeln                      93               00019500     
195       6.9.6 The procedure page                         94               00019600     
196                                                                         00019700     
197   6.10 Programs                                        95               00019800     
198   6.11 Hardware representation                         97               00019900     
199                                                                         00020000     
200                                                                         00020100     
201                                                                         00020200     
202   APPENDICES                                                            00020300     
203                                                                         00020400     
204                                                                         00020500     
205   A.   Collected syntax                                98               00020600     
206   B.   Index                                          106               00020700     
207   C.   Required identifiers                           112               00020800     
208                                                                         00020900     
209                                                                         00021000     
210                                                                         00021100     
211   TABLES                                                                00021200     
212                                                                         00021300     
213                                                                         00021400     
214   1. Metalanguage symbols                              10               00021500     
215   2. Dyadic arithmetic operations                      69               00021600     
216   3. Monadic arithmetic operations                     69               00021700     
217   4. Set operations                                    72               00021800     
218   5. Relational operations                             72               00021900     
219   6. Alternative symbols                               97               00022000     
220                                                                         00022100     
221                                                                         00022200     
222                                                                         00022300     
223                                                                         00022400     
224                                                                         00022500     
225                                                                         00022600     
226                                                                         00022700     
227                                                                         00022800     
228                                                                         00022900     
229                                                                         00023000     
230                                                                         00023100     
231                                                                         00023200     
232                                                                         00023300     
233                                                                         00023400     
234                                                                         00023500     
235                                                                         00023600     
236                                                                         00023700     
237                                                                         00023800     
238                                                                         00023900     
239                                                                         00024000     
240                                                                         00024100     
241                                                                         00024200     
242                                                                         00024300     
243                                                                         00024400     
244                               DP7185                             PAGE  500024500     
245                                                                         00024600     
246                                                                         00024700     
247                                                                         00024800     
248   FOREWORD                                                              00024900     
249   --------                                                              00025000     
250                                                                         00025100     
251                                                                         00025200     
252   The language Pascal was designed by Professor Niklaus Wirth to satisfy00025300     
253   two principal aims:                                                   00025400     
254                                                                         00025500     
255                                                                         00025600     
256      a)  to make available a language suitable for teaching  programming00025700     
257          as   a  systematic  discipline  based  on  certain  fundamental00025800     
258          concepts clearly and naturally reflected by the language.      00025900     
259                                                                         00026000     
260                                                                         00026100     
261      b)  to define  a  language  whose  implementations  could  be  both00026200     
262          reliable and efficient on then available computers.            00026300     
263                                                                         00026400     
264                                                                         00026500     
265   However, it has become apparent that Pascal has  attributes  which  go00026600     
266   far  beyond  these  original goals.  It is now being increasingly used00026700     
267   commercially in the writing of both system and  application  software.00026800     
268   This  standard  is  primarily  a consequence of the growing commercial00026900     
269   interest in Pascal and the need to promote the portability  of  Pascal00027000     
270   programs between data processing systems.                             00027100     
271                                                                         00027200     
272                                                                         00027300     
273   In drafting this standard the continued stability of Pascal has been a00027400     
274   prime   objective.   However,   apart  from  changes  to  clarify  the00027500     
275   specification, two major changes have been introduced:                00027600     
276                                                                         00027700     
277                                                                         00027800     
278      a)  the syntax used to specify procedural and functional parameters00027900     
279          has  been changed to require the use of a procedure or function00028000     
280          heading,  as  appropriate  (see  6.6.3.1).   This  change   was00028100     
281          introduced to overcome a language insecurity.                  00028200     
282                                                                         00028300     
283                                                                         00028400     
284      b)  a fifth kind of parameter, the conformant array parameter,  has00028500     
285          been  introduced  (see  6.6.3.7).  With this kind of parameter,00028600     
286          the required bounds of the index-type of  an  actual  parameter00028700     
287          are  not  fixed,  but  are  restricted  to a specified range of00028800     
288          values.                                                        00028900     
289                                                                         00029000     
290                                                                         00029100     
291                                                                         00029200     
292                                                                         00029300     
293                                                                         00029400     
294                                                                         00029500     
295                                                                         00029600     
296                                                                         00029700     
297                                                                         00029800     
298                                                                         00029900     
299                                                                         00030000     
300                                                                         00030100     
301                                                                         00030200     
302                                                                         00030300     
303                                                                         00030400     
304                               DP7185                             PAGE  600030500     
305                                                                         00030600     
306                                                                         00030700     
307                                                                         00030800     
308   0. INTRODUCTION                                                       00030900     
309   ---------------                                                       00031000     
310                                                                         00031100     
311                                                                         00031200     
312   The appendices are included for the convenience of the reader of  this00031300     
313   standard.   They  do  not  form  a  part  of  the requirements of this00031400     
314   standard.                                                             00031500     
315                                                                         00031600     
316                                                                         00031700     
317                                                                         00031800     
318                                                                         00031900     
319                                                                         00032000     
320                                                                         00032100     
321                                                                         00032200     
322                                                                         00032300     
323                                                                         00032400     
324                                                                         00032500     
325                                                                         00032600     
326                                                                         00032700     
327                                                                         00032800     
328                                                                         00032900     
329                                                                         00033000     
330                                                                         00033100     
331                                                                         00033200     
332                                                                         00033300     
333                                                                         00033400     
334                                                                         00033500     
335                                                                         00033600     
336                                                                         00033700     
337                                                                         00033800     
338                                                                         00033900     
339                                                                         00034000     
340                                                                         00034100     
341                                                                         00034200     
342                                                                         00034300     
343                                                                         00034400     
344                                                                         00034500     
345                                                                         00034600     
346                                                                         00034700     
347                                                                         00034800     
348                                                                         00034900     
349                                                                         00035000     
350                                                                         00035100     
351                                                                         00035200     
352                                                                         00035300     
353                                                                         00035400     
354                                                                         00035500     
355                                                                         00035600     
356                                                                         00035700     
357                                                                         00035800     
358                                                                         00035900     
359                                                                         00036000     
360                                                                         00036100     
361                                                                         00036200     
362                                                                         00036300     
363                                                                         00036400     
364                               DP7185                             PAGE  700036500     
365                                                                         00036600     
366                                                                         00036700     
367                                                                         00036800     
368   1. SCOPE OF THIS STANDARD                                             00036900     
369   -------------------------                                             00037000     
370                                                                         00037100     
371                                                                         00037200     
372      1.1 This  Standard  specifies  the  semantics  and  syntax  of  the00037300     
373          computer programming language Pascal by specifying requirements00037400     
374          for a processor and for a conforming program.   Two  levels  of00037500     
375          compliance are defined for both processors and programs.       00037600     
376                                                                         00037700     
377                                                                         00037800     
378      1.2 This standard does not specify                                 00037900     
379                                                                         00038000     
380                                                                         00038100     
381         a)  the size or complexity of a program and its data  that  will00038200     
382             exceed  the  capacity of any specific data processing system00038300     
383             or the capacity of a particular processor;                  00038400     
384                                                                         00038500     
385                                                                         00038600     
386         b)  the minimal requirements of a data processing system that is00038700     
387             capable  of  supporting an implementation of a processor for00038800     
388             Pascal;                                                     00038900     
389                                                                         00039000     
390                                                                         00039100     
391         c)  the method of activating the program-block  or  the  set  of00039200     
392             commands  used  to control the environment in which a Pascal00039300     
393             program is transformed and executed;                        00039400     
394                                                                         00039500     
395                                                                         00039600     
396         d)  the mechanism  by  which  programs  written  in  Pascal  are00039700     
397             transformed for use by a data processing system;            00039800     
398                                                                         00039900     
399                                                                         00040000     
400         e)  the method for reporting errors or warnings;                00040100     
401                                                                         00040200     
402                                                                         00040300     
403         f)  the typographical representation of a program published  for00040400     
404             human reading.                                              00040500     
405                                                                         00040600     
406                                                                         00040700     
407                                                                         00040800     
408                                                                         00040900     
409                                                                         00041000     
410                                                                         00041100     
411                                                                         00041200     
412                                                                         00041300     
413                                                                         00041400     
414                                                                         00041500     
415                                                                         00041600     
416                                                                         00041700     
417                                                                         00041800     
418                                                                         00041900     
419                                                                         00042000     
420                                                                         00042100     
421                                                                         00042200     
422                                                                         00042300     
423                                                                         00042400     
424                               DP7185                             PAGE  800042500     
425                                                                         00042600     
426                                                                         00042700     
427                                                                         00042800     
428   2. REFERENCES                                                         00042900     
429   -------------                                                         00043000     
430                                                                         00043100     
431                                                                         00043200     
432   None.                                                                 00043300     
433                                                                         00043400     
434                                                                         00043500     
435                                                                         00043600     
436                                                                         00043700     
437                                                                         00043800     
438                                                                         00043900     
439                                                                         00044000     
440                                                                         00044100     
441                                                                         00044200     
442                                                                         00044300     
443                                                                         00044400     
444                                                                         00044500     
445                                                                         00044600     
446                                                                         00044700     
447                                                                         00044800     
448                                                                         00044900     
449                                                                         00045000     
450                                                                         00045100     
451                                                                         00045200     
452                                                                         00045300     
453                                                                         00045400     
454                                                                         00045500     
455                                                                         00045600     
456                                                                         00045700     
457                                                                         00045800     
458                                                                         00045900     
459                                                                         00046000     
460                                                                         00046100     
461                                                                         00046200     
462                                                                         00046300     
463                                                                         00046400     
464                                                                         00046500     
465                                                                         00046600     
466                                                                         00046700     
467                                                                         00046800     
468                                                                         00046900     
469                                                                         00047000     
470                                                                         00047100     
471                                                                         00047200     
472                                                                         00047300     
473                                                                         00047400     
474                                                                         00047500     
475                                                                         00047600     
476                                                                         00047700     
477                                                                         00047800     
478                                                                         00047900     
479                                                                         00048000     
480                                                                         00048100     
481                                                                         00048200     
482                                                                         00048300     
483                                                                         00048400     
484                               DP7185                             PAGE  900048500     
485                                                                         00048600     
486                                                                         00048700     
487                                                                         00048800     
488   3. DEFINITIONS                                                        00048900     
489   --------------                                                        00049000     
490                                                                         00049100     
491                                                                         00049200     
492      3.1  error - A violation by a program of the rewuirements  of  this00049300     
493           standard whose detection by a processor is optional.          00049400     
494                                                                         00049500     
495                                                                         00049600     
496      3.2  implementation-defined - Possibly      differing       between00049700     
497           processors, but defined for any particular processor.         00049800     
498                                                                         00049900     
499                                                                         00050000     
500      3.3  implementation-dependent - Possibly     differing      between00050100     
501           processors,  and  not  necessarily  defined for any particular00050200     
502           processor.                                                    00050300     
503                                                                         00050400     
504                                                                         00050500     
505      3.4  processor - A compiler, interpreter, or other mechanism  which00050600     
506           accepts  the program as input and either executes it, prepares00050700     
507           it for execution, or both.                                    00050800     
508                                                                         00050900     
509                                                                         00051000     
510                                                                         00051100     
511                                                                         00051200     
512                                                                         00051300     
513                                                                         00051400     
514                                                                         00051500     
515                                                                         00051600     
516                                                                         00051700     
517                                                                         00051800     
518                                                                         00051900     
519                                                                         00052000     
520                                                                         00052100     
521                                                                         00052200     
522                                                                         00052300     
523                                                                         00052400     
524                                                                         00052500     
525                                                                         00052600     
526                                                                         00052700     
527                                                                         00052800     
528                                                                         00052900     
529                                                                         00053000     
530                                                                         00053100     
531                                                                         00053200     
532                                                                         00053300     
533                                                                         00053400     
534                                                                         00053500     
535                                                                         00053600     
536                                                                         00053700     
537                                                                         00053800     
538                                                                         00053900     
539                                                                         00054000     
540                                                                         00054100     
541                                                                         00054200     
542                                                                         00054300     
543                                                                         00054400     
544                               DP7185                             PAGE 1000054500     
545                                                                         00054600     
546                                                                         00054700     
547                                                                         00054800     
548   4. DEFINITIONAL CONVENTIONS                                           00054900     
549   ---------------------------                                           00055000     
550                                                                         00055100     
551                                                                         00055200     
552   The  metalanguage  used in this standard to specify the syntax of  the00055300     
553   constructs  is  based on  Backus-Naur  Form.  The  notation  has  been00055400     
554   modified   from  the  original  to  permit  greater   convenience   of00055500     
555   description   and  to  allow  for  iterative  productions  to  replace00055600     
556   recursive  ones.   Table   1   lists  the  meanings  of  the   various00055700     
557   meta-symbols.  Further  specification  of the  constructs is given  by00055800     
558   prose  and,  in some  cases,  by  equivalent  program  fragments.  Any00055900     
559   identifier  that  is  defined  in  clause  6  as the  identifier  of a00056000     
560   predeclared  or predefined  entity  shall  denote  that  entity by its00056100     
561   occurrence in such a program fragment. In all other respects, any such00056200     
562   program  fragment  is  bound  by any  pertinent  requirements  of this00056300     
563   standard.                                                             00056400     
564                                                                         00056500     
565                                                                         00056600     
566   Table 1. Metalanguage symbols                                        00056700     
567                                                                         00056800     
568 ---------------------------------------------------------------         00056900     
569   Meta-symbol         Meaning                                           00057000     
570 ---------------------------------------------------------------         00057100     
571                                                                         00057200     
572   =                   shall be defined to be                            00057300     
573                                                                         00057400     
574   >                   shall have as an alternative definition           00057500     
575                                                                         00057600     
576   |                   alternatively                                     00057700     
577                                                                         00057800     
578   .                   end of definition                                 00057900     
579                                                                         00058000     
580   [x]                 0 or 1 instance of x                              00058100     
581                                                                         00058200     
582   {x}                 0 or more instances of x                          00058300     
583                                                                         00058400     
584   (x|y)               grouping: either of x or y                        00058500     
585                                                                         00058600     
586   "xyz"               the terminal symbol "xyz"                         00058700     
587                                                                         00058800     
588   meta-identifier     a non-terminal symbol                             00058900     
589 ---------------------------------------------------------------         00059000     
590                                                                         00059100     
591   A meta-identifier shall be a sequence of letters and hyphens beginning00059200     
592   with a letter.                                                        00059300     
593                                                                         00059400     
594   A  sequence  of  terminal  and  non-terminal  symbols  in a production00059500     
595   implies the concatenation of the text that they ultimately  represent.00059600     
596   Within 6.1 this concatenation is direct;  no characters may intervene.00059700     
597   In all other parts of this standard the concatenation is in accordance00059800     
598   with the rules set out in 6.1.                                        00059900     
599                                                                         00060000     
600   The  characters  required to form Pacal programs are those  implicitly00060100     
601                                                                         00060200     
602                                                                         00060300     
603                                                                         00060400     
604                               DP7185                             PAGE 1100060500     
605                                                                         00060600     
606                                                                         00060700     
607                                                                         00060800     
608   required to form the tokens and separators defined in 6.1.            00060900     
609                                                                         00061000     
610                                                                         00061100     
611   Use of the  words  of,  in,  containing  and  closest-containing  when00061200     
612   expressing  a  relationship  between  terminal or non-terminal symbols00061300     
613   shall have the following meanings.                                    00061400     
614                                                                         00061500     
615                                                                         00061600     
616      the x of a y:  refers to the x occurring directly in  a  production00061700     
617      defining y.                                                        00061800     
618                                                                         00061900     
619                                                                         00062000     
620      the x in a y:  is synonymous with "the x of a y".                  00062100     
621                                                                         00062200     
622                                                                         00062300     
623      a y containing an x:   refers  to  any  x  directly  or  indirectly00062400     
624      derived from y.                                                    00062500     
625                                                                         00062600     
626                                                                         00062700     
627      the y closest-containing an x:  that y which contains an x but does00062800     
628      not contain another y containing that x.                           00062900     
629                                                                         00063000     
630                                                                         00063100     
631   These syntactic conventions are used in clause 6  to  specify  certain00063200     
632   syntactic  requirements  and  also  the  contexts within which certain00063300     
633   semantic specifications apply.                                        00063400     
634                                                                         00063500     
635                                                                         00063600     
636                                                                         00063700     
637                                                                         00063800     
638                                                                         00063900     
639                                                                         00064000     
640                                                                         00064100     
641                                                                         00064200     
642                                                                         00064300     
643                                                                         00064400     
644                                                                         00064500     
645                                                                         00064600     
646                                                                         00064700     
647                                                                         00064800     
648                                                                         00064900     
649                                                                         00065000     
650                                                                         00065100     
651                                                                         00065200     
652                                                                         00065300     
653                                                                         00065400     
654                                                                         00065500     
655                                                                         00065600     
656                                                                         00065700     
657                                                                         00065800     
658                                                                         00065900     
659                                                                         00066000     
660                                                                         00066100     
661                                                                         00066200     
662                                                                         00066300     
663                                                                         00066400     
664                               DP7185                             PAGE 1200066500     
665                                                                         00066600     
666                                                                         00066700     
667                                                                         00066800     
668   5. COMPLIANCE                                                         00066900     
669   -------------                                                         00067000     
670                                                                         00067100     
671                                                                         00067200     
672   NOTE:  There are two levels of compliance - level 0 and level 1. Level00067300     
673   0 does not include conformant array parameters.  Level 1 does  include00067400     
674   conformant array parameters.                                          00067500     
675                                                                         00067600     
676                                                                         00067700     
677      5.1 PROCESSORS                                                     00067800     
678      --------------                                                     00067900     
679                                                                         00068000     
680                                                                         00068100     
681      A processor complying with the requirements of this standard shall:00068200     
682                                                                         00068300     
683            a)  if it complies at level 0, accept all the features of the00068400     
684                language  specified in clause 6,  except for  6.6.3.6(e),00068500     
685                6.6.3.7 and 6.6.3.8,  with the meanings defined in clause00068600     
686                6;                                                       00068700     
687                                                                         00068800     
688                                                                         00068900     
689            b)  if it complies at level 1, accept all the features of the00069000     
690                language  specified in clause 6 with the meanings defined00069100     
691                in clause 6;                                             00069200     
692                                                                         00069300     
693                                                                         00069400     
694            c)  not require the inclusion  of  substitute  or  additional00069500     
695                language elements in a program  in  order  to  accomplish00069600     
696                a feature of the language that is specified in clause 6; 00069700     
697                                                                         00069800     
698                                                                         00069900     
699            d)  be  accompanied  by a document that provides a definition00070000     
700                of all implementation-defined features;                  00070100     
701                                                                         00070200     
702                                                                         00070300     
703            e)  detect any violation by a program  of the requirements of00070400     
704                this standard that is not designated an error;           00070500     
705                                                                         00070600     
706                                                                         00070700     
707            f)  treat  each  violation  that is designated an error in at00070800     
708                least one of the following ways:                         00070900     
709                                                                         00071000     
710                                                                         00071100     
711                1)  there  shall  be  a  statement  in  an   accompanying00071200     
712                    document that the error is not reported;             00071300     
713                                                                         00071400     
714                                                                         00071500     
715                2)  the processor shall have  reported  a  prior  warning00071600     
716                    that an occurrence of that error was possible;       00071700     
717                                                                         00071800     
718                                                                         00071900     
719                                                                         00072000     
720                                                                         00072100     
721                                                                         00072200     
722                               DP7185                             PAGE 1300072300     
723                                                                         00072400     
724                                                                         00072500     
725                                                                         00072600     
726                3)  the  processor  shall   report   the   error   during00072700     
727                    preparation of the program for execution;            00072800     
728                                                                         00072900     
729                                                                         00073000     
730                4)  the processor shall report the error during execution00073100     
731                    of  the  program,  and  terminate  execution  of  the00073200     
732                    program.                                             00073300     
733                                                                         00073400     
734                                                                         00073500     
735            g)  be accompanied by a document  that  separately  describes00073600     
736                any  features  accepted  by  the  processor  that are not00073700     
737                specified  in  clause  6.   Such  extensions   shall   be00073800     
738                described  as  being  'extensions  to Pascal specified by00073900     
739                ISO7185:  198-'.                                         00074000     
740                                                                         00074100     
741                                                                         00074200     
742            h)  be able to process in a manner similar to that  specified00074300     
743                for errors any use of any such extension;                00074400     
744                                                                         00074500     
745                                                                         00074600     
746            i)  be able to process in a manner similar to that  specified00074700     
747                for   errors  any  use  of  an   implementation-dependent00074800     
748                feature.                                                 00074900     
749                                                                         00075000     
750                                                                         00075100     
751      5.2 PROGRAMS                                                       00075200     
752      ------------                                                       00075300     
753                                                                         00075400     
754                                                                         00075500     
755      A program complying with the requirements of this standard shall:  00075600     
756                                                                         00075700     
757                                                                         00075800     
758            a)  if it complies at level 0, use only those features of the00075900     
759                language  specified in clause 6,  except for  6.6.3.6(e),00076000     
760                6.6.3.7 and 6.6.3.8;                                     00076100     
761                                                                         00076200     
762                                                                         00076300     
763            b)  if it complies at level 1, use only those features of the00076400     
764                language specified in clause 6;                          00076500     
765                                                                         00076600     
766                                                                         00076700     
767            c)  not   rely   on   any   particular    interpretation   of00076800     
768                implementation-dependent features.                       00076900     
769                                                                         00077000     
770                                                                         00077100     
771      NOTE: The results produced by the processing of a complying program00077200     
772      by different complying processors are not required to be the same. 00077300     
773                                                                         00077400     
774                                                                         00077500     
775                                                                         00077600     
776                                                                         00077700     
777                                                                         00077800     
778                                                                         00077900     
779                                                                         00078000     
780                                                                         00078100     
781                                                                         00078200     
782                               DP7185                             PAGE 1400078300     
783                                                                         00078400     
784                                                                         00078500     
785                                                                         00078600     
786   6. REQUIREMENTS                                                       00078700     
787   ---------------                                                       00078800     
788                                                                         00078900     
789                                                                         00079000     
790      6.1 LEXICAL TOKENS                                                 00079100     
791      ------------------                                                 00079200     
792                                                                         00079300     
793                                                                         00079400     
794      NOTE:  The syntax given in  this  sub-clause  (6.1)  describes  the00079500     
795      formation  of  lexical tokens from characters and the separation of00079600     
796      these tokens, and therefore does not adhere to the  same  rules  as00079700     
797      the syntax in the rest of this standard.                           00079800     
798                                                                         00079900     
799                                                                         00080000     
800         6.1.1 GENERAL                                                   00080100     
801         -------------                                                   00080200     
802                                                                         00080300     
803                                                                         00080400     
804         The lexical tokens used to construct Pascal  programs  shall  be00080500     
805         classified   into   special-symbols,   identifiers,  directives,00080600     
806         unsigned-numbers,    labels    and    character-strings.     The00080700     
807         representation   of   any   letter  (upper-case  or  lower-case,00080800     
808         differences of  font,  etc)  occurring  anywhere  outside  of  a00080900     
809         character-string  (see  6.1.7)  shall  be  insignificant in that00081000     
810         occurrence to the meaning of the program.                       00081100     
811                                                                         00081200     
812                                                                         00081300     
813            letter = "a"|"b"|"c"|"d"|"e"|"f"|"g"|"h"|"i"|"j"|"k"|        00081400     
814                     "l"|"m"|"n"|"o"|"p"|"q"|"r"|"s"|"t"|"u"|"v"|        00081500     
815                     "w"|"x"|"y"|"z" .                                   00081600     
816                                                                         00081700     
817                                                                         00081800     
818             digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9" .           00081900     
819                                                                         00082000     
820                                                                         00082100     
821         6.1.2 SPECIAL SYMBOLS                                           00082200     
822         ---------------------                                           00082300     
823                                                                         00082400     
824                                                                         00082500     
825         The special symbols are tokens having special meanings and shall00082600     
826         be used to delimit the syntactic units of the language.         00082700     
827                                                                         00082800     
828                                                                         00082900     
829             special-symbol = "+"|"-"|"*"|"/"|"="|                       00083000     
830                              "<"|">"|"["|"]"|"."|                       00083100     
831                              ","|":"|";"|"^"|"("|")"|                   00083200     
832                              "<>"|"<="|">="|":="|".."|                  00083300     
833                              word-symbol .                              00083400     
834                                                                         00083500     
835                                                                         00083600     
836             word-symbol = "and"|"array"|"begin"|"case"|"const"|"div"|   00083700     
837                           "do"|"downto"|"else"|"end"|"file"|"for"|      00083800     
838                           "function"|"goto"|"if"|"in"|"label"|"mod"|    00083900     
839                                                                         00084000     
840                                                                         00084100     
841                                                                         00084200     
842                               DP7185                             PAGE 1500084300     
843                                                                         00084400     
844                                                                         00084500     
845                                                                         00084600     
846                           "nil"|"not"|"of"|"or"|"packed"|"procedure"|   00084700     
847                           "program"|"record"|"repeat"|"set"|"then"|     00084800     
848                           "to"|"type"|"until"|"var"|"while"|"with" .    00084900     
849                                                                         00085000     
850                                                                         00085100     
851         6.1.3 IDENTIFIERS                                               00085200     
852         -----------------                                               00085300     
853                                                                         00085400     
854                                                                         00085500     
855         Identifiers  may  be  of  any  length.   All  characters  of  an00085600     
856         identifier  shall be significant.  No identifier shall have  the00085700     
857         same spelling as any word-symbol.                               00085800     
858                                                                         00085900     
859                                                                         00086000     
860             identifier = letter {letter | digit} .                      00086100     
861                                                                         00086200     
862                                                                         00086300     
863         Examples:                                                       00086400     
864                                                                         00086500     
865                X         time      readinteger  WG4   AlterHeatSetting  00086600     
866                InquireWorkstationTransformation                         00086700     
867                InquireWorkstationIdentification                         00086800     
868                                                                         00086900     
869                                                                         00087000     
870         6.1.4 DIRECTIVES                                                00087100     
871         ----------------                                                00087200     
872                                                                         00087300     
873                                                                         00087400     
874         A  directive  shall  occur  only in a  procedure-declaration  or00087500     
875         function-declaration.  The directive  forward  shall be the only00087600     
876         required    directive    (see   6.6.1    and    6.6.2).    Other00087700     
877         implementation-dependent   directives   may  be   provided.   No00087800     
878         directive shall have the same spelling as any word-symbol.      00087900     
879                                                                         00088000     
880                                                                         00088100     
881             directive = letter {letter | digit} .                       00088200     
882                                                                         00088300     
883                                                                         00088400     
884         NOTE: On  many  processors  the  directive  external  is used to00088500     
885         specify that the procedure-block or function-block corresponding00088600     
886         to that procedure-heading or function-heading is external to the00088700     
887         program-block.  Usually it is in a library in a form to be input00088800     
888         to, or that has been produced by, the processor.                00088900     
889                                                                         00089000     
890                                                                         00089100     
891                                                                         00089200     
892                                                                         00089300     
893                                                                         00089400     
894                                                                         00089500     
895                                                                         00089600     
896                                                                         00089700     
897                                                                         00089800     
898                                                                         00089900     
899                                                                         00090000     
900                                                                         00090100     
901                                                                         00090200     
902                               DP7185                             PAGE 1600090300     
903                                                                         00090400     
904                                                                         00090500     
905                                                                         00090600     
906         6.1.5 NUMBERS                                                   00090700     
907         -------------                                                   00090800     
908                                                                         00090900     
909                                                                         00091000     
910         An unsigned-integer shall denote in decimal notation a value  of00091100     
911         integer-type  (see  6.4.2.2).   An unsigned-real shall denote in00091200     
912         decimal notation a value of real-type (see 6.4.2.2).  The letter00091300     
913         "e"  preceding a scale factor shall mean 'times ten to the power00091400     
914         of'.  The value of an unsigned-integer shall be  in  the  closed00091500     
915         interval 0 to maxint (see 6.4.2.2 and 6.7.2.2).                 00091600     
916                                                                         00091700     
917                                                                         00091800     
918         digit-sequence = digit {digit} .                                00091900     
919         unsigned-integer = digit-sequence .                             00092000     
920         unsigned-real =                                                 00092100     
921             unsigned-integer "." digit-sequence ["e" scale-factor] |    00092200     
922             unsigned-integer "e" scale-factor .                         00092300     
923         unsigned-number = unsigned-integer | unsigned-real .            00092400     
924         scale-factor = signed-integer .                                 00092500     
925         sign = "+" | "-" .                                              00092600     
926         signed-integer = [sign] unsigned-integer .                      00092700     
927         signed-real = [sign] unsigned-real .                            00092800     
928         signed-number = signed-integer | signed-real .                  00092900     
929                                                                         00093000     
930                                                                         00093100     
931         Examples:                                                       00093200     
932                                                                         00093300     
933                1e10     1     +100     -0.1     5e-3     87.35E+8       00093400     
934                                                                         00093500     
935                                                                         00093600     
936                                                                         00093700     
937         6.1.6 LABELS                                                    00093800     
938         ------------                                                    00093900     
939                                                                         00094000     
940                                                                         00094100     
941         Labels shall be digit-sequences and shall  be  distinguished  by00094200     
942         their  apparent  integral  values,  that  shall be in the closed00094300     
943         interval 0 to 9999.                                             00094400     
944                                                                         00094500     
945                                                                         00094600     
946                             label = digit-sequence .                    00094700     
947                                                                         00094800     
948                                                                         00094900     
949                                                                         00095000     
950                                                                         00095100     
951         6.1.7 CHARACTER-STRINGS                                         00095200     
952         -----------------------                                         00095300     
953                                                                         00095400     
954                                                                         00095500     
955         A character-string  containing  a  single  string-element  shall00095600     
956         denote  a  value of char-type (see 6.4.2.2).  A character-string00095700     
957         containing more than one string-element shall denote a value  of00095800     
958         a  string-type  (see 6.4.3.2) with the same number of components00095900     
959                                                                         00096000     
960                                                                         00096100     
961                                                                         00096200     
962                               DP7185                             PAGE 1700096300     
963                                                                         00096400     
964                                                                         00096500     
965                                                                         00096600     
966         as the character-string contains string-elements.  If the string00096700     
967         of characters is to contain an apostrophe, this apostrophe shall00096800     
968         be denoted by an apostrophe-image.  Each string-character  shall00096900     
969         denote an implementation-defined value of char-type.            00097000     
970                                                                         00097100     
971                                                                         00097200     
972            character-string = "'" string-element                        00097300     
973               {string-element} "'" .                                    00097400     
974            string-element = apostrophe-image | string-character .       00097500     
975            apostrophe-image = "''" .                                    00097600     
976            string-character =                                           00097700     
977               one-of-a-set-of-implementation-defined-characters.        00097800     
978                                                                         00097900     
979                                                                         00098000     
980         Examples:                                                       00098100     
981                                                                         00098200     
982                                                                         00098300     
983                   'A'          ';'          ''''                        00098400     
984                   'Pascal'                  'THIS IS A STRING'          00098500     
985                                                                         00098600     
986                                                                         00098700     
987                                                                         00098800     
988         6.1.8 TOKEN SEPARATORS                                          00098900     
989         ----------------------                                          00099000     
990                                                                         00099100     
991                                                                         00099200     
992         The construct                                                   00099300     
993                                                                         00099400     
994                                                                         00099500     
995              "{" any-sequence-of-characters-and-separations-of-lines-   00099600     
996                  not-containing-right-brace "}"                         00099700     
997                                                                         00099800     
998                                                                         00099900     
999         shall  be  a  comment  if  the  "{"  does  not  occur  within  a00100000     
1000         character-string  or  within  a  comment.  The substitution of a00100100     
1001         space for a comment shall not alter the meaning of a program.   00100200     
1002                                                                         00100300     
1003                                                                         00100400     
1004         Comments,  spaces  (except  in   character-strings),   and   the00100500     
1005         separation  of consecutive lines shall be considered to be token00100600     
1006         separators.  Zero or more token separators may occur between any00100700     
1007         two  consecutive  tokens, or before the first token of a program00100800     
1008         text.  There shall be at least one separator between any pair of00100900     
1009         consecutive  tokens made up of identifiers, word-symbols, labels00101000     
1010         or unsigned-numbers.  No separators shall occur within tokens.  00101100     
1011                                                                         00101200     
1012                                                                         00101300     
1013                                                                         00101400     
1014                                                                         00101500     
1015                                                                         00101600     
1016                                                                         00101700     
1017                                                                         00101800     
1018                                                                         00101900     
1019                                                                         00102000     
1020                                                                         00102100     
1021                                                                         00102200     
1022                               DP7185                             PAGE 1800102300     
1023                                                                         00102400     
1024                                                                         00102500     
1025                                                                         00102600     
1026      6.2 BLOCKS, SCOPE AND ACTIVATIONS                                  00102700     
1027      ---------------------------------                                  00102800     
1028                                                                         00102900     
1029                                                                         00103000     
1030         6.2.1 BLOCK                                                     00103100     
1031         -----------                                                     00103200     
1032                                                                         00103300     
1033                                                                         00103400     
1034         A block closest-containing a label-declaration-part in  which  a00103500     
1035         label  occurs  shall  closest-contain  exactly  one statement in00103600     
1036         which that label occurs.  The  occurrence  of  a  label  in  the00103700     
1037         label-declaration-part of a block shall be its defining-point as00103800     
1038         a label for the region which is the block.                      00103900     
1039                                                                         00104000     
1040                                                                         00104100     
1041         block =  label-declaration-part                                 00104200     
1042                    constant-definition-part                             00104300     
1043                      type-definition-part                               00104400     
1044                        variable-declaration-part                        00104500     
1045                          procedure-and-function-declaration-part        00104600     
1046                           statement-part .                              00104700     
1047                                                                         00104800     
1048         label-declaration-part = ["label" label {"," label} ";"] .      00104900     
1049                                                                         00105000     
1050         constant-definition-part = ["const" constant-definition ";"     00105100     
1051                                     {constant-definition ";"}] .        00105200     
1052                                                                         00105300     
1053         type-definition-part = ["type" type-definition ";"              00105400     
1054                                 {type-definition ";"}] .                00105500     
1055                                                                         00105600     
1056         variable-declaration-part = ["var" variable-declaration ";"     00105700     
1057                                      {variable-declaration ";"}] .      00105800     
1058                                                                         00105900     
1059         procedure-and-function-declaration-part =                       00106000     
1060                {(procedure-declaration | function-declaration) ";"} .   00106100     
1061                                                                         00106200     
1062                                                                         00106300     
1063                                                                         00106400     
1064         The statement-part shall specify the algorithmic actions  to  be00106500     
1065         executed upon an activation of the block.                       00106600     
1066                                                                         00106700     
1067                                                                         00106800     
1068                      statement-part = compound-statement .              00106900     
1069                                                                         00107000     
1070                                                                         00107100     
1071         All variables contained  by  an  activation,  except  for  those00107200     
1072         listed  as program-parameters, shall be totally-undefined at the00107300     
1073         commencement of that activation.                                00107400     
1074                                                                         00107500     
1075                                                                         00107600     
1076                                                                         00107700     
1077                                                                         00107800     
1078                                                                         00107900     
1079                                                                         00108000     
1080                                                                         00108100     
1081                                                                         00108200     
1082                               DP7185                             PAGE 1900108300     
1083                                                                         00108400     
1084                                                                         00108500     
1085                                                                         00108600     
1086         6.2.2 SCOPE                                                     00108700     
1087         -----------                                                     00108800     
1088                                                                         00108900     
1089                                                                         00109000     
1090            6.2.2.1 Each   identifier   or   label   contained   by   the00109100     
1091            program-block shall have a defining-point.                   00109200     
1092                                                                         00109300     
1093                                                                         00109400     
1094            6.2.2.2 Each defining-point shall have a  region  that  is  a00109500     
1095            part  of  the program text, and a scope that is a part or all00109600     
1096            of that region.                                              00109700     
1097                                                                         00109800     
1098                                                                         00109900     
1099            6.2.2.3 The  region  of  each   defining-point   is   defined00110000     
1100            elsewhere (see 6.2.1, 6.2.2.10, 6.3, 6.4.1, 6.4.2.3, 6.4.3.3,00110100     
1101            6.5.1, 6.5.3.3, 6.6.1, 6.6.2, 6.6.3.1, 6.8.3.10).            00110200     
1102                                                                         00110300     
1103                                                                         00110400     
1104            6.2.2.4 The scope of each defining-point shall be its  region00110500     
1105            (including  all  regions  enclosed by that region) subject to00110600     
1106            6.2.2.5 and 6.2.2.6.                                         00110700     
1107                                                                         00110800     
1108                                                                         00110900     
1109            6.2.2.5 When an identifier or label that has a defining-point00111000     
1110            for  region  A has a further defining-point for some region B00111100     
1111            enclosed by A, then region B and all regions  enclosed  by  B00111200     
1112            shall  be  excluded  from the scope of the defining-point for00111300     
1113            region A.                                                    00111400     
1114                                                                         00111500     
1115                                                                         00111600     
1116            6.2.2.6 The field-identifier  of  the  field-specifier  of  a00111700     
1117            field-designator   (see   6.5.3.3)   shall   be  one  of  the00111800     
1118            field-identifiers  associated  with  a   component   of   the00111900     
1119            record-type   possessed   by   the   record-variable  of  the00112000     
1120            field-designator.                                            00112100     
1121                                                                         00112200     
1122                                                                         00112300     
1123            6.2.2.7 The scope of a defining-point  of  an  identifier  or00112400     
1124            label  shall  include  no  other  defining-point  of the same00112500     
1125            identifier or label.                                         00112600     
1126                                                                         00112700     
1127                                                                         00112800     
1128            6.2.2.8 Within the scope of a defining-point of an identifier00112900     
1129            or  label,  all occurrences of that identifier or label shall00113000     
1130            be designated applied occurrences, except for  an  occurrence00113100     
1131            that  constituted  the  defining-point  of that identifier or00113200     
1132            label;  such an occurrence shall  be  designated  a  defining00113300     
1133            occurrence.   No  occurrence  outside  that scope shall be an00113400     
1134            applied occurrence.                                          00113500     
1135                                                                         00113600     
1136                                                                         00113700     
1137            6.2.2.9 The defining-point of an identifier  or  label  shall00113800     
1138            precede  all  applied occurrences of that identifier or label00113900     
1139                                                                         00114000     
1140                                                                         00114100     
1141                                                                         00114200     
1142                               DP7185                             PAGE 2000114300     
1143                                                                         00114400     
1144                                                                         00114500     
1145                                                                         00114600     
1146            contained by the program-block  with  one  exception,  namely00114700     
1147            that  a type-identifier may have an applied occurrence in the00114800     
1148            domain-type  of  any  new-pointer-types  contained   by   the00114900     
1149            type-definition-part  that contains the defining-point of the00115000     
1150            type-identifier.                                             00115100     
1151                                                                         00115200     
1152                                                                         00115300     
1153            6.2.2.10 Identifiers that denote required  constants,  types,00115400     
1154            procedures   and   functions   shall  be  used  as  if  their00115500     
1155            defining-points have a region enclosing the program.         00115600     
1156                                                                         00115700     
1157                                                                         00115800     
1158            6.2.2.11 Whatever an  identifier  or  label  denotes  at  its00115900     
1159            defining-point shall be denoted at all applied occurrences of00116000     
1160            that identifier or label.                                    00116100     
1161                                                                         00116200     
1162                                                                         00116300     
1163                                                                         00116400     
1164         6.2.3 ACTIVATIONS                                               00116500     
1165         -----------------                                               00116600     
1166                                                                         00116700     
1167                                                                         00116800     
1168            6.2.3.1. A procedure-identifier or function-identifier having00116900     
1169            a  defining-point  for  a region which is a block, within the00117000     
1170            procedure-and-function-declaration-part of that  block  shall00117100     
1171            be designated local to that block.                           00117200     
1172                                                                         00117300     
1173                                                                         00117400     
1174            6.2.3.2. The activation of a block shall contain             00117500     
1175                                                                         00117600     
1176                                                                         00117700     
1177            a) for the statement-part of the  block,  an  algorithm,  the00117800     
1178               completion  of  which  shall terminate the activation (see00117900     
1179               also 6.8.2.4);                                            00118000     
1180                                                                         00118100     
1181                                                                         00118200     
1182            b) for each label in a statement, having a defining-point  in00118300     
1183               the  label-declaration-part  of the block, a program-point00118400     
1184               in the algorithm of the activation of that statement;     00118500     
1185                                                                         00118600     
1186                                                                         00118700     
1187            c) for each variable-identifier having a  defining-point  for00118800     
1188               the  region  which is the block, a variable possessing the00118900     
1189               type associated with the variable-identifier;             00119000     
1190                                                                         00119100     
1191                                                                         00119200     
1192            d) for  each  procedure-identifier  local  to  the  block,  a00119300     
1193               procedure  with the formal parameters associated with, and00119400     
1194               the     procedure-block     corresponding     to,      the00119500     
1195               procedure-identifier;  and                                00119600     
1196                                                                         00119700     
1197                                                                         00119800     
1198            e) for  each  function-identifier  local  to  the  block,   a00119900     
1199                                                                         00120000     
1200                                                                         00120100     
1201                                                                         00120200     
1202                               DP7185                             PAGE 2100120300     
1203                                                                         00120400     
1204                                                                         00120500     
1205                                                                         00120600     
1206               function  with  the formal parameters associated with, the00120700     
1207               function-block corresponding to, and  the  type  possessed00120800     
1208               by, the function-identifier.                              00120900     
1209                                                                         00121000     
1210                                                                         00121100     
1211            6.2.3.3. The activation of a procedure or function  shall  be00121200     
1212            the  activation  of  the  block  of  its  procedure-block  or00121300     
1213            function-block, respectively, and shall be designated within:00121400     
1214                                                                         00121500     
1215                                                                         00121600     
1216            a) the activation containing the procedure or function; and  00121700     
1217                                                                         00121800     
1218                                                                         00121900     
1219            b) all activations that that containing activation is within.00122000     
1220                                                                         00122100     
1221                                                                         00122200     
1222            NOTE: An  activation  of  a  block  B  can  only  be   within00122300     
1223            activations of blocks containing B. Thus an activation is not00122400     
1224            within another activation of the same block.                 00122500     
1225                                                                         00122600     
1226                                                                         00122700     
1227            Within  an activation,  an applied occurrence of a  label  or00122800     
1228            variable-identifier,   or   of  a   procedure-identifier   or00122900     
1229            function-identifier  local to  the block  of the  activation,00123000     
1230            shall  denote  the  corresponding  program-point,   variable,00123100     
1231            procedure, or function, respectively, of that activation.    00123200     
1232                                                                         00123300     
1233                                                                         00123400     
1234            6.2.3.4. A   procedure-statement    or    function-designator00123500     
1235            contained  in  the  algorithm  of  an  activation  and   that00123600     
1236            specifies the activation of a block  shall be designated  the00123700     
1237            activation-point of that activation of the block.            00123800     
1238                                                                         00123900     
1239                                                                         00124000     
1240            6.2.3.5. The algorithm, program-points, variables, procedures00124100     
1241            and functions,  if any,  shall exist until the termination of00124200     
1242            the activation.                                              00124300     
1243                                                                         00124400     
1244                                                                         00124500     
1245                                                                         00124600     
1246      6.3 CONSTANT-DEFINITIONS                                           00124700     
1247      ------------------------                                           00124800     
1248                                                                         00124900     
1249                                                                         00125000     
1250      A  constant-definition shall  introduce an  identifier to  denote a00125100     
1251      value.                                                             00125200     
1252                                                                         00125300     
1253                                                                         00125400     
1254         constant-definition = identifier "=" constant .                 00125500     
1255         constant = [sign] (unsigned-number | constanr-identifier)       00125600     
1256                    |  character-string .                                00125700     
1257         constant-identifier = identifier .                              00125800     
1258                                                                         00125900     
1259                                                                         00126000     
1260                                                                         00126100     
1261                                                                         00126200     
1262                               DP7185                             PAGE 2200126300     
1263                                                                         00126400     
1264                                                                         00126500     
1265                                                                         00126600     
1266      The  occurrence  of an  identifier  in a  constant-definition  of a00126700     
1267      constant-definition-part   of  a   block   shall   constitute   its00126800     
1268      defining-point for the region that is the block. The constant shall00126900     
1269      not  contain  an  applied  occurrence  of  the  identifier  in  the00127000     
1270      constant-definition.  Each  applied occurrence  of that  identifier00127100     
1271      shall be a constant-identifier and shall  denote the value  denoted00127200     
1272      by the constant of the constant-definition.  A  constant-identifier00127300     
1273      in a constant containing an occurrence of a sign  shall  have  been00127400     
1274      defined to denote a value of real-type or of integer-type.         00127500     
1275                                                                         00127600     
1276                                                                         00127700     
1277      6.4 TYPE-DEFINITIONS                                               00127800     
1278      --------------------                                               00127900     
1279                                                                         00128000     
1280                                                                         00128100     
1281         6.4.1 GENERAL                                                   00128200     
1282         -------------                                                   00128300     
1283                                                                         00128400     
1284                                                                         00128500     
1285         A  type-definition  shall  introduce an  identifier  to denote a00128600     
1286         type.  Type shall be an  attribute  that is  possessed  by every00128700     
1287         value and every variable.  Each occurrence of a  new-type  shall00128800     
1288         denote a type that is distinct from any other new-type.         00128900     
1289                                                                         00129000     
1290                                                                         00129100     
1291            type-definition = identifier "=" type-denoter .              00129200     
1292            type-denoter = type-identifier | new-type .                  00129300     
1293            new-type = new-ordinal-type | new-structured-type |          00129400     
1294                       new-pointer-type .                                00129500     
1295                                                                         00129600     
1296                                                                         00129700     
1297         The occurrence of  an  identifier  in  a  type-definition  of  a00129800     
1298         type-definition-part   of   a   block   shall   constitute   its00129900     
1299         defining-point for the region that is the block.   Each  applied00130000     
1300         occurrence  of  that  identifier  shall be a type-identifier and00130100     
1301         shall denote the same type as  that  which  is  denoted  by  its00130200     
1302         type-denoter.  Except for applied occurrences as the domain-type00130300     
1303         of a new-pointer-type, the type-denoter  shall  not  contain  an00130400     
1304         applied occurrence of the identifier in the type-definition.    00130500     
1305                                                                         00130600     
1306                                                                         00130700     
1307         Types shall be  classified  as  simple,  structured  or  pointer00130800     
1308         types.   The  required  types  shall  be  denoted  by predefined00130900     
1309         type-identifiers (see 6.4.2.2 and 6.4.3.5).                     00131000     
1310                                                                         00131100     
1311                                                                         00131200     
1312              simple-type-identifier = type-identifier .                 00131300     
1313              structured-type-identifier = type-identifier .             00131400     
1314              pointer-type-identifier = type-identifier .                00131500     
1315              type-identifier = identifier .                             00131600     
1316                                                                         00131700     
1317                                                                         00131800     
1318                                                                         00131900     
1319                                                                         00132000     
1320                                                                         00132100     
1321                                                                         00132200     
1322                               DP7185                             PAGE 2300132300     
1323                                                                         00132400     
1324                                                                         00132500     
1325                                                                         00132600     
1326         A    type-identifier    shall     be     considered     as     a00132700     
1327         simple-type-identifier,   a   structured-type-identifier,  or  a00132800     
1328         pointer-type-identifier, according to the type that it denotes. 00132900     
1329                                                                         00133000     
1330                                                                         00133100     
1331                                                                         00133200     
1332                                                                         00133300     
1333         6.4.2 SIMPLE-TYPES                                              00133400     
1334         ------------------                                              00133500     
1335                                                                         00133600     
1336                                                                         00133700     
1337            6.4.2.1 GENERAL                                              00133800     
1338            ---------------                                              00133900     
1339                                                                         00134000     
1340                                                                         00134100     
1341            A simple-type shall determine an ordered set of values.   The00134200     
1342            values  of  each  ordinal-type  shall  have  integer  ordinal00134300     
1343            numbers.   An   ordinal-type-identifier   shall   denote   an00134400     
1344            ordinal-type.                                                00134500     
1345                                                                         00134600     
1346                                                                         00134700     
1347                 simple-type = ordinal-type | real-type .                00134800     
1348                 ordinal-type = new-ordinal-type |                       00134900     
1349                                  integer-type | Boolean-type |          00135000     
1350                                  char-type |                            00135100     
1351                                  ordinal-type-identifier .              00135200     
1352                 new-ordinal-type = enumerated-type | subrange-type .    00135300     
1353                 ordinal-type-identifier = identifier .                  00135400     
1354                                                                         00135500     
1355                                                                         00135600     
1356                                                                         00135700     
1357                                                                         00135800     
1358            6.4.2.2 REQUIRED SIMPLE-TYPES                                00135900     
1359            -----------------------------                                00136000     
1360                                                                         00136100     
1361                                                                         00136200     
1362            The following types shall exist:                             00136300     
1363                                                                         00136400     
1364                                                                         00136500     
1365            integer-type  The  required  integer-type-identifier  integer00136600     
1366                          shall denote the integer-type. The values shall00136700     
1367                          be a subset of the  whole numbers,  denoted  as00136800     
1368                          specified in 6.1.5 by the signed-integer values00136900     
1369                          (see also 6.7.2.2).  The  ordinal  number  of a00137000     
1370                          value  of  integer-type  shall  be  the   value00137100     
1371                          itself.                                        00137200     
1372                                                                         00137300     
1373                                                                         00137400     
1374            real-type     The required  real-type-identifier  real  shall00137500     
1375                          denote the real-type.  The values  shall  be an00137600     
1376                          implementation-defined   subset  of  the   real00137700     
1377                          numbers  denoted  as specified in 6.1.5 by  the00137800     
1378                          signed-real values.                            00137900     
1379                                                                         00138000     
1380                                                                         00138100     
1381                                                                         00138200     
1382                               DP7185                             PAGE 2400138300     
1383                                                                         00138400     
1384                                                                         00138500     
1385                                                                         00138600     
1386            Boolean-type  The  required  Boolean-type-identifier  Boolean00138700     
1387                          shall denote the Boolean-type. The values shall00138800     
1388                          be the enumeration of truth  values  denoted by00138900     
1389                          the  required  constant-identifiers  false  and00139000     
1390                          true,  such  that false is the  predecessor  of00139100     
1391                          true.  The ordinal  numbers of the truth values00139200     
1392                          denoted by false and true  shall be the integer00139300     
1393                          values 0 and 1 respectively.                   00139400     
1394                                                                         00139500     
1395                                                                         00139600     
1396            char-type     The required  char-type-identifier  char  shall00139700     
1397                          denote  the char-type.  The values shall be the00139800     
1398                          enumeration of a set of  implementation-defined00139900     
1399                          characters,   some   possibly  without  graphic00140000     
1400                          representations.  The ordinal  numbers  of  the00140100     
1401                          character    values    shall   be   values   of00140200     
1402                          integer-type, that are  implementation-defined,00140300     
1403                          and   that   are   determined  by  mapping  the00140400     
1404                          character values on to consecutive non-negative00140500     
1405                          integer  values  starting at zero.  The mapping00140600     
1406                          shall  be  order  preserving.   The   following00140700     
1407                          relations shall hold:                          00140800     
1408                                                                         00140900     
1409                                                                         00141000     
1410                          a)  The subset of character values representing00141100     
1411                              the  digits  0  to  9  shall be numerically00141200     
1412                              ordered and contiguous.                    00141300     
1413                                                                         00141400     
1414                                                                         00141500     
1415                          b)  The subset of character values representing00141600     
1416                              the   upper-case   letters   A   to  Z,  if00141700     
1417                              available, shall be alphabetically  ordered00141800     
1418                              but not necessarily contiguous.            00141900     
1419                                                                         00142000     
1420                                                                         00142100     
1421                          c)  The subset of character values representing00142200     
1422                              the   lower-case   letters   a   to  z,  if00142300     
1423                              available, shall be alphabetically  ordered00142400     
1424                              but not necessarily contiguous.            00142500     
1425                                                                         00142600     
1426                                                                         00142700     
1427                          d)  The ordering relationship between  any  two00142800     
1428                              character  values  shall  be  the  same  as00142900     
1429                              between their ordinal numbers.             00143000     
1430                                                                         00143100     
1431                                                                         00143200     
1432            NOTE:  Operators applicable to the required simple-types  are00143300     
1433            specified in 6.7.2.                                          00143400     
1434                                                                         00143500     
1435                                                                         00143600     
1436                                                                         00143700     
1437                                                                         00143800     
1438                                                                         00143900     
1439                                                                         00144000     
1440                                                                         00144100     
1441                                                                         00144200     
1442                               DP7185                             PAGE 2500144300     
1443                                                                         00144400     
1444                                                                         00144500     
1445                                                                         00144600     
1446            6.4.2.3 ENUMERATED-TYPES                                     00144700     
1447            ------------------------                                     00144800     
1448                                                                         00144900     
1449                                                                         00145000     
1450            An enumerated-type shall determine an ordered set  of  values00145100     
1451            by  enumeration  of the identifiers that denote those values.00145200     
1452            The ordering of these  values  shall  be  determined  by  the00145300     
1453            sequence  in which their identifiers are enumerated, i.e.  if00145400     
1454            x precedes y then x is less than y.  The ordinal number of  a00145500     
1455            value  that  is  of an enumerated-type shall be determined by00145600     
1456            mapping all the values of the type as their identifiers occur00145700     
1457            in   the   identifier-list   of  the  enumerated-type  on  to00145800     
1458            consecutive  non-negative  integer  values  of   integer-type00145900     
1459            starting from zero.                                          00146000     
1460                                                                         00146100     
1461                                                                         00146200     
1462               enumerated-type = "(" identifier-list ")" .               00146300     
1463               identifier-list = identifier { "," identifier } .         00146400     
1464                                                                         00146500     
1465                                                                         00146600     
1466            The occurrence of an identifier in the identifier-list of  an00146700     
1467            enumerated-type  shall  constitute  its  defining-point  as a00146800     
1468            constant-identifier  for  the  region  which  is  the   block00146900     
1469            closest-containing the enumerated type.                      00147000     
1470                                                                         00147100     
1471                                                                         00147200     
1472            Examples:                                                    00147300     
1473                                                                         00147400     
1474                                                                         00147500     
1475                  (red,yellow,green,blue,tartan)                         00147600     
1476                  (club,diamond,heart,spade)                             00147700     
1477                  (married,divorced,widowed,single)                      00147800     
1478                  (scanning,found,notpresent)                            00147900     
1479                  (Busy,InterruptEnable,ParityError,OutOfPaper,LineBreak)00148000     
1480                                                                         00148100     
1481                                                                         00148200     
1482                                                                         00148300     
1483                                                                         00148400     
1484            6.4.2.4 SUBRANGE-TYPES                                       00148500     
1485            ----------------------                                       00148600     
1486                                                                         00148700     
1487                                                                         00148800     
1488            The  definition  of a type as a subrange of  an  ordinal-type00148900     
1489            shall include identification of the smallest and the  largest00149000     
1490            value in the subrange. The first constant of a  subrange-type00149100     
1491            shall specify the smallest value, and this shall be less than00149200     
1492            or equal to the largest value which shall be specified by the00149300     
1493            other constant of the subrange-type.  Both constants shall be00149400     
1494            of the same  ordinal-type,  and that  ordinal-type  shall  be00149500     
1495            designated the host type of the subrange-type.               00149600     
1496                                                                         00149700     
1497                                                                         00149800     
1498               subrange-type = constant ".." constant .                  00149900     
1499                                                                         00150000     
1500                                                                         00150100     
1501                                                                         00150200     
1502                               DP7185                             PAGE 2600150300     
1503                                                                         00150400     
1504                                                                         00150500     
1505                                                                         00150600     
1506            Examples:                                                    00150700     
1507                                                                         00150800     
1508                                                                         00150900     
1509                      1..100                                             00151000     
1510                      -10..+10                                           00151100     
1511                      red..green                                         00151200     
1512                      '0'..'9'                                           00151300     
1513                                                                         00151400     
1514                                                                         00151500     
1515                                                                         00151600     
1516         6.4.3 STRUCTURED-TYPES                                          00151700     
1517         ----------------------                                          00151800     
1518                                                                         00151900     
1519                                                                         00152000     
1520            6.4.3.1 GENERAL                                              00152100     
1521            ---------------                                              00152200     
1522                                                                         00152300     
1523                                                                         00152400     
1524            A new-structured-type shall be classified as  an  array-type,00152500     
1525            record-type,   set-type   or   file-type   according  to  the00152600     
1526            unpacked-structured-type     closest-contained     by     the00152700     
1527            new-structured-type.    A   component   of   a   value  of  a00152800     
1528            structured-type shall be a value.                            00152900     
1529                                                                         00153000     
1530                                                                         00153100     
1531              structured-type = new-structured-type |                    00153200     
1532                                  structured-type-identifier .           00153300     
1533              unpacked-structured-type = array-type | record-type |      00153400     
1534                                         set-type | file-type .          00153500     
1535              new-structured-type = ["packed"] unpacked-structured-type .00153600     
1536                                                                         00153700     
1537                                                                         00153800     
1538            The occurrence of the token packed in  a  new-structured-type00153900     
1539            shall  designate  the  type  denoted  thereby as packed.  The00154000     
1540            designation of a structured-type as packed shall indicate  to00154100     
1541            the   processor   that   data-storage  of  values  should  be00154200     
1542            economized, even if this causes operations on, or accesses to00154300     
1543            components  of,  variables  possessing  the  type  to be less00154400     
1544            efficient in terms of space or time.                         00154500     
1545                                                                         00154600     
1546                                                                         00154700     
1547            The designation of a structured-type as packed  shall  affect00154800     
1548            the  representation  in  data-storage of that structured-type00154900     
1549            only;  that is if  a  component  is  itself  structured,  the00155000     
1550            component's  representation  in  data-storage shall be packed00155100     
1551            only if the type of the component is designated packed.      00155200     
1552                                                                         00155300     
1553                                                                         00155400     
1554            NOTE:  The ways in which the treatment of entities of a  type00155500     
1555            is  affected  by whether or not the type is designated packed00155600     
1556            are specified in 6.4.3.2, 6.4.5,  6.6.3.3,  6.6.3.8,  6.6.5.400155700     
1557            and 6.7.1.                                                   00155800     
1558                                                                         00155900     
1559                                                                         00156000     
1560                                                                         00156100     
1561                                                                         00156200     
1562                               DP7185                             PAGE 2700156300     
1563                                                                         00156400     
1564                                                                         00156500     
1565                                                                         00156600     
1566            6.4.3.2 ARRAY-TYPES                                          00156700     
1567            -------------------                                          00156800     
1568                                                                         00156900     
1569                                                                         00157000     
1570            An array-type shall be structured  as  a  mapping  from  each00157100     
1571            value  specified by its index-type onto a distinct component.00157200     
1572            Each  component  shall  have  the   type   denoted   by   the00157300     
1573            type-denoter of the component-type of the array-type.        00157400     
1574                                                                         00157500     
1575                                                                         00157600     
1576              array-type = "array" "[" index-type { "," index-type } "]" 00157700     
1577                           "of" component-type .                         00157800     
1578              index-type = ordinal-type .                                00157900     
1579              component-type = type-denoter .                            00158000     
1580                                                                         00158100     
1581                                                                         00158200     
1582            Examples:                                                    00158300     
1583                                                                         00158400     
1584                                                                         00158500     
1585                      array [1..100] of real                             00158600     
1586                      array [Boolean] of colour                          00158700     
1587                                                                         00158800     
1588                                                                         00158900     
1589            An array-type that  specifies  a  sequence  of  two  or  more00159000     
1590            index-types   shall   be   an  abbreviated  notation  for  an00159100     
1591            array-type specified to have  as  its  index-type  the  first00159200     
1592            index-type in the sequence, and to have a component-type that00159300     
1593            is an  array-type  specifying  the  sequence  of  index-types00159400     
1594            without  the  first and specifying the same component-type as00159500     
1595            the  original   specification.    The   component-type   thus00159600     
1596            constructed  shall  be  designated  packed if and only if the00159700     
1597            original array-type is designated  packed.   The  abbreviated00159800     
1598            form and the full form shall be equivalent.                  00159900     
1599                                                                         00160000     
1600                                                                         00160100     
1601            NOTE:  Each of  the  following  two  examples  thus  contains00160200     
1602            different ways of expressing its array-type.                 00160300     
1603                                                                         00160400     
1604                                                                         00160500     
1605            Example 1:                                                   00160600     
1606                                                                         00160700     
1607                                                                         00160800     
1608                 array[Boolean] of                                       00160900     
1609                         array[1..10] of array[size] of real             00161000     
1610                 array[Boolean] of array [1..10,size] of real            00161100     
1611                 array[Boolean,1..10,size] of real                       00161200     
1612                 array[Boolean,1..10] of array[size] of real             00161300     
1613                                                                         00161400     
1614                                                                         00161500     
1615            Example 2:                                                   00161600     
1616                                                                         00161700     
1617                                                                         00161800     
1618                 packed array[1..10,1..8] of Boolean                     00161900     
1619                                                                         00162000     
1620                                                                         00162100     
1621                                                                         00162200     
1622                               DP7185                             PAGE 2800162300     
1623                                                                         00162400     
1624                                                                         00162500     
1625                                                                         00162600     
1626                 packed array[1..10] of                                  00162700     
1627                          packed array[1..8] of Boolean                  00162800     
1628                                                                         00162900     
1629                                                                         00163000     
1630            Let i denote a value of the index-type;  let  v[i]  denote  a00163100     
1631            value of that component of the array-type that corresponds to00163200     
1632            the value i by the structure  of  the  array-type;   let  the00163300     
1633            smallest  and  largest  values specified by the index-type be00163400     
1634            denoted by m and n;  and let k = (ord(n)-ord(m)+1) denote the00163500     
1635            number  of  values  specified  by  the  index-type.  Then the00163600     
1636            values of the array-type shall be the  distinct  k-tuples  of00163700     
1637            the form:                                                    00163800     
1638                                                                         00163900     
1639                                                                         00164000     
1640                                  (v[m], ... ,v[n])                      00164100     
1641                                                                         00164200     
1642                                                                         00164300     
1643            NOTE:  A value of an  array-type  does  not  therefore  exist00164400     
1644            unless  all  of  its  component  values  are defined.  If the00164500     
1645            component-type  has  c  values,  then  it  follows  that  the00164600     
1646            cardinality  of  the  set  of  values  of the array-type is c00164700     
1647            raised to the power k.                                       00164800     
1648                                                                         00164900     
1649                                                                         00165000     
1650            Any type designated  packed  and  denoted  by  an  array-type00165100     
1651            having  as  its  index-type  a  denotation of a subrange-type00165200     
1652            specifying  a  smallest  value  of  1,  and  having  as   its00165300     
1653            component-type  a  denotation  of  the  char-type,  shall  be00165400     
1654            designated a string-type.                                    00165500     
1655                                                                         00165600     
1656                                                                         00165700     
1657            The  correspondence  of  character-strings   to   values   of00165800     
1658            string-types   is   obtained   by   relating  the  individual00165900     
1659            characters of the character-string, taken in  left  to  right00166000     
1660            order,  to the components of the values of the string-type in00166100     
1661            order of increasing index.                                   00166200     
1662                                                                         00166300     
1663                                                                         00166400     
1664            NOTE:  The  values  of  a  string-type   possess   additional00166500     
1665            properties  which,  allow  writing  them  to  textfiles  (see00166600     
1666            6.9.4.7) and define their use with relational-operators  (see00166700     
1667            6.7.2.5).                                                    00166800     
1668                                                                         00166900     
1669                                                                         00167000     
1670                                                                         00167100     
1671                                                                         00167200     
1672            6.4.3.3 RECORD-TYPES                                         00167300     
1673            --------------------                                         00167400     
1674                                                                         00167500     
1675                                                                         00167600     
1676            The structure and  values  of  a  record-type  shall  be  the00167700     
1677            structure and values of the field-list of the record-type.   00167800     
1678                                                                         00167900     
1679                                                                         00168000     
1680                                                                         00168100     
1681                                                                         00168200     
1682                               DP7185                             PAGE 2900168300     
1683                                                                         00168400     
1684                                                                         00168500     
1685                                                                         00168600     
1686              record-type = "record" field-list  "end" .                 00168700     
1687              field-list = [ (fixed-part [ ";" variant-part ] |          00168800     
1688                             variant-part) [";"]] .                      00168900     
1689              fixed-part = record-section { ";" record-section } .       00169000     
1690              record-section = identifier-list ":" type-denoter .        00169100     
1691              variant-part = "case" variant-selector "of"                00169200     
1692                               variant { ";" variant } .                 00169300     
1693              variant-selector = [tag-field ":"] tag-type .              00169400     
1694              tag-field = identifier .                                   00169500     
1695              variant = case-constant-list ":" "(" field-list ")" .      00169600     
1696              tag-type = ordinal-type-identifier .                       00169700     
1697              case-constant-list = case-constant { "," case-constant } . 00169800     
1698              case-constant = constant .                                 00169900     
1699                                                                         00170000     
1700                                                                         00170100     
1701            A  field-list  which  contains  neither  a  fixed-part  nor a00170200     
1702            variant-part shall have no components,  shall define a single00170300     
1703            null value, and shall be designated empty.                   00170400     
1704                                                                         00170500     
1705                                                                         00170600     
1706            The occurrence of an identifier in the identifier-list  of  a00170700     
1707            record-section  of  a  fixed  part  of  a  field-list   shall00170800     
1708            constitute  its defining-point as a field-identifier for  the00170900     
1709            field-list,  and shall associate the field-identifier with  a00171000     
1710            distinct component, which shall be designated a field, of the00171100     
1711            record-type and of the field-list.  That component shall have00171200     
1712            the type denoted by the type-denoter of the record-section.  00171300     
1713                                                                         00171400     
1714                                                                         00171500     
1715            The field-list closest-containing a variant-part shall have a00171600     
1716            distinct component which shall have the values and  structure00171700     
1717            defined by the variant-part.                                 00171800     
1718                                                                         00171900     
1719                                                                         00172000     
1720            Let Vi denote the value of the i-th component of a  non-empty00172100     
1721            field-list  having  m components;  then  the  values  of  the00172200     
1722            field-list shall be distinct m-tuples of the form            00172300     
1723                                                                         00172400     
1724                                                                         00172500     
1725                      (V1, V2, ..., Vm).                                 00172600     
1726                                                                         00172700     
1727                                                                         00172800     
1728            NOTE:  If the type of the i-th component has Fi values,  then00172900     
1729            the  cardinality of the set of values of the field-list shall00173000     
1730            be (F1 * F2 * ...  * Fm).                                    00173100     
1731                                                                         00173200     
1732                                                                         00173300     
1733            A  tag-type  shall   denote   the   type   denoted   by   the00173400     
1734            ordinal-type-identifier  of  the  tag-type.   A case-constant00173500     
1735            shall denote  the  value  denoted  by  the  constant  of  the00173600     
1736            case-constant.                                               00173700     
1737                                                                         00173800     
1738                                                                         00173900     
1739                                                                         00174000     
1740                                                                         00174100     
1741                                                                         00174200     
1742                               DP7185                             PAGE 3000174300     
1743                                                                         00174400     
1744                                                                         00174500     
1745                                                                         00174600     
1746            The type of each case-constant in the case-constant-list of a00174700     
1747            variant  of  a  variant-part  shall  be  compatible  with the00174800     
1748            tag-type of the variant-selector of  the  variant-part.   The00174900     
1749            values  denoted  by  all  case-constants  of  a  type that is00175000     
1750            required to be compatible with  a  given  tag-type  shall  be00175100     
1751            distinct  and  the  set  thereof shall be equal to the set of00175200     
1752            values specified by the tag-type.  The values denoted by  the00175300     
1753            case-constants  of  the case-constant-list of a variant shall00175400     
1754            be designated as corresponding to the variant.               00175500     
1755                                                                         00175600     
1756                                                                         00175700     
1757            With each variant-part shall be associated a type  designated00175800     
1758            the  selector-type  possessed  by  the  variant-part.  If the00175900     
1759            variant-selector of the variant-part contains a tag-field, or00176000     
1760            if the case-constant-list of each variant of the variant-part00176100     
1761            contains only one case-constant, then the selector-type shall00176200     
1762            be  denoted  by  the  tag-type,   and  each  variant  of  the00176300     
1763            variant-part shall be associated with those values  specified00176400     
1764            by the selector-type denoted by  the  case-constants  of  the00176500     
1765            case-constant-list   of   the   variant.    Otherwise,    the00176600     
1766            selector-type possessed by the variant-part shall  be  a  new00176700     
1767            ordinal-type constructed such that there is exactly one value00176800     
1768            of the type for each variant of  the  variant-part,   and  no00176900     
1769            others, and each variant shall be associated with a  distinct00177000     
1770            value of that type.                                          00177100     
1771                                                                         00177200     
1772                                                                         00177300     
1773            Each variant-part shall  have  a  component  which  shall  be00177400     
1774            designated the selector of the variant-part, and which  shall00177500     
1775            possess  the  selector-type  of  the  variant-part.   If  the00177600     
1776            variant-selector of the variant-part  contains  a  tag-field,00177700     
1777            then the occurrence of an identifier in the  tag-field  shall00177800     
1778            constitute   the  defining-point  of  the  identifier  as   a00177900     
1779            field-identifier for  the  region  which  is  the record-type00178000     
1780            closest-containing the variant-part, and shall associate  the00178100     
1781            field identifier with the selector of the  variant-part.  The00178200     
1782            selector shall be designated a field of  the  record-type  if00178300     
1783            and only if it is associated with a field-identifier.        00178400     
1784                                                                         00178500     
1785                                                                         00178600     
1786            Each variant  of  a  variant-part  shall  denote  a  distinct00178700     
1787            component of the variant-part;  the component shall have  the00178800     
1788            values and structure of the field-list of  the  variant,  and00178900     
1789            shall be  associated  with  those  values  specified  by  the00179000     
1790            selector-type   possessed  by  the  variant-part  which   are00179100     
1791            associated with the variant. The value of the selector of the00179200     
1792            variant-part shall cause the associated variant and component00179300     
1793            of the variant-part  to  be  in  a  state  that  shall be the00179400     
1794            distinct pairs                                               00179500     
1795                                                                         00179600     
1796                                                                         00179700     
1797                      (k, Xk),                                           00179800     
1798                                                                         00179900     
1799                                                                         00180000     
1800                                                                         00180100     
1801                                                                         00180200     
1802                               DP7185                             PAGE 3100180300     
1803                                                                         00180400     
1804                                                                         00180500     
1805                                                                         00180600     
1806            where  k  represents  a  value  of  the   selector   of   the00180700     
1807            variant-part,  and  Xk  is  a  value of the field-list of the00180800     
1808            active variant of the variant-part.                          00180900     
1809                                                                         00181000     
1810                                                                         00181100     
1811            NOTES:                                                       00181200     
1812                                                                         00181300     
1813                                                                         00181400     
1814               1.  If there are n values specified by the  selector-type,00181500     
1815               and  if  the field-list of the variant associated with the00181600     
1816               i-th value has Ti values, then the cardinality of the  set00181700     
1817               of  values  of  the variant-part is (T1 + T2 + ...  + Tn).00181800     
1818               There is  no  component  of  a  value  of  a  variant-part00181900     
1819               corresponding   to   any   non-active   variant   of   the00182000     
1820               variant-part.                                             00182100     
1821                                                                         00182200     
1822                                                                         00182300     
1823               2.  Restrictions  placed  on  the  use  of  fields  of   a00182400     
1824               record-variable  pertaining to variant-parts are specified00182500     
1825               in 6.5.3.3, 6.6.3.3 and 6.6.5.3.                          00182600     
1826                                                                         00182700     
1827                                                                         00182800     
1828            Examples:                                                    00182900     
1829                                                                         00183000     
1830                                                                         00183100     
1831              record                                                     00183200     
1832                year : 0..2000;                                          00183300     
1833                month : 1..12;                                           00183400     
1834                day : 1..31                                              00183500     
1835              end                                                        00183600     
1836                                                                         00183700     
1837              record                                                     00183800     
1838                name, firstname : string;                                00183900     
1839                age : 0..99;                                             00184000     
1840                case married : Boolean of                                00184100     
1841                true : ( Spousesname : string);                          00184200     
1842                false: ()                                                00184300     
1843              end                                                        00184400     
1844                                                                         00184500     
1845              record                                                     00184600     
1846                x,y : real;                                              00184700     
1847                area : real;                                             00184800     
1848                case shape of                                            00184900     
1849                triangle :                                               00185000     
1850                  ( side : real;                                         00185100     
1851                    inclination, angle1, angle2 : angle);                00185200     
1852                rectangle :                                              00185300     
1853                  (side1, side2 : real;                                  00185400     
1854                   skew : angle);                                        00185500     
1855                circle :                                                 00185600     
1856                  (diameter : real);                                     00185700     
1857              end                                                        00185800     
1858                                                                         00185900     
1859                                                                         00186000     
1860                                                                         00186100     
1861                                                                         00186200     
1862                               DP7185                             PAGE 3200186300     
1863                                                                         00186400     
1864                                                                         00186500     
1865                                                                         00186600     
1866            6.4.3.4 SET-TYPES                                            00186700     
1867            -----------------                                            00186800     
1868                                                                         00186900     
1869                                                                         00187000     
1870            A  set-type  shall  determine  the  set  of  values  that  is00187100     
1871            structured as the powerset of its base-type.  Thus each value00187200     
1872            of a set-type shall be a set whose members  shall  be  unique00187300     
1873            values of the base-type.                                     00187400     
1874                                                                         00187500     
1875                                                                         00187600     
1876               set-type = "set" "of" base-type .                         00187700     
1877               base-type = ordinal-type .                                00187800     
1878                                                                         00187900     
1879                                                                         00188000     
1880            NOTE: Operators   applicable  to  values  of  set-types   are00188100     
1881            specified in 6.7.2.4.                                        00188200     
1882                                                                         00188300     
1883                                                                         00188400     
1884            Examples:                                                    00188500     
1885                                                                         00188600     
1886                                                                         00188700     
1887                 set of char                                             00188800     
1888                 set of (club, diamond, heart, spade)                    00188900     
1889                                                                         00189000     
1890                                                                         00189100     
1891            NOTE: If  the  base-type of a set-type has b values then  the00189200     
1892            cardinality of the set of values is 2 raised to the power b. 00189300     
1893                                                                         00189400     
1894                                                                         00189500     
1895            For  every  ordinal-type  S,  there  exists  an  unpacked set00189600     
1896            designated the unpacked canonical  set-of-T  type  and  there00189700     
1897            exists a packed set  type  designated  the  packed  canonical00189800     
1898            set-of-T type. If S is a subrange-type then  T  is  the  host00189900     
1899            type of S; otherwise T is S. Each value of the type  set of S00190000     
1900            is also a value of the unpacked canonical set-of-T type,  and00190100     
1901            each value of the type packed set of S is also a value of the00190200     
1902            packed canonical set-of-T type.                              00190300     
1903                                                                         00190400     
1904                                                                         00190500     
1905            6.4.3.5 FILE-TYPES                                           00190600     
1906            ------------------                                           00190700     
1907                                                                         00190800     
1908                                                                         00190900     
1909            NOTE:  A file-type  describes  sequences  of  values  of  the00191000     
1910            specified component-type, together with a current position in00191100     
1911            each sequence and a mode which indicates whether the sequence00191200     
1912            is being inspected or generated.                             00191300     
1913                                                                         00191400     
1914                                                                         00191500     
1915                      file-type = "file" "of" component-type .           00191600     
1916                                                                         00191700     
1917                                                                         00191800     
1918                                                                         00191900     
1919                                                                         00192000     
1920                                                                         00192100     
1921                                                                         00192200     
1922                               DP7185                             PAGE 3300192300     
1923                                                                         00192400     
1924                                                                         00192500     
1925                                                                         00192600     
1926            A type-denoter shall not be permissible as the component-type00192700     
1927            of  a  file-type  if  it  denotes  either  a  file-type  or a00192800     
1928            structured-type having any component  whose  type-denoter  is00192900     
1929            not permissible as the component-type of a file-type.        00193000     
1930                                                                         00193100     
1931                                                                         00193200     
1932            Examples:                                                    00193300     
1933                                                                         00193400     
1934                                                                         00193500     
1935                 file of real                                            00193600     
1936                 file of vector                                          00193700     
1937                                                                         00193800     
1938                                                                         00193900     
1939            A file-type shall  define  implicitly  a  type  designated  a00194000     
1940            sequence-type  having  exactly  those  values, which shall be00194100     
1941            designated sequences, defined by the following five rules.   00194200     
1942                                                                         00194300     
1943                                                                         00194400     
1944            NOTE:  The  notation  x~y  represents  the  concatenation  of00194500     
1945            sequences  x and y.  The explicit representation of sequences00194600     
1946            (e.g.  S(c)), of concatenation of sequences,  of  the  first,00194700     
1947            last and rest selectors, and of sequence equality is not part00194800     
1948            of the Pascal language.  These notations are used  to  define00194900     
1949            file  values,  below,  and  the  required  file operations in00195000     
1950            6.6.5.2 and 6.6.6.5.                                         00195100     
1951                                                                         00195200     
1952                                                                         00195300     
1953            a) S() shall be a value of the sequence-type S, and shall  be00195400     
1954               designated  the  empty sequence.  The empty sequence shall00195500     
1955               have no components.                                       00195600     
1956                                                                         00195700     
1957                                                                         00195800     
1958            b) Let c be a value of the specified component-type, and  let00195900     
1959               x be a value of the sequence-type S.  Then S(c) shall be a00196000     
1960               sequence of type S, consisting  of  the  single  component00196100     
1961               value  c,  and  S(c)~x  shall also be a sequence, distinct00196200     
1962               from S(), of type S.                                      00196300     
1963                                                                         00196400     
1964                                                                         00196500     
1965            c) Let c, S, and x be as in (b);  let y denote  the  sequence00196600     
1966               S(c)~x;   and  let z denote the sequence x~S(c);  then the00196700     
1967               notation y.first shall denote c (i.e., the first component00196800     
1968               value  of  y),  y.rest  shall denote x (i.e., the sequence00196900     
1969               obtained from y by  deleting  the  first  component),  and00197000     
1970               z.last  shall  denote c (i.e., the last component value of00197100     
1971               z).                                                       00197200     
1972                                                                         00197300     
1973                                                                         00197400     
1974            d) Let x and y each be a non-empty sequence of type S;   then00197500     
1975               x  =  y  shall  be  true  if  and  only if both (x.first =00197600     
1976               y.first) and (x.rest = y.rest) are  true.   If  x  is  the00197700     
1977               empty  sequence, then x = y shall be true if and only if y00197800     
1978               is also the empty sequence.                               00197900     
1979                                                                         00198000     
1980                                                                         00198100     
1981                                                                         00198200     
1982                               DP7185                             PAGE 3400198300     
1983                                                                         00198400     
1984                                                                         00198500     
1985                                                                         00198600     
1986            e) Let x, y, and z be sequences of type S;   then  x~(y~z)  =00198700     
1987               (x~y)~z, S()~x = x, and x~S() = x shall be true.          00198800     
1988                                                                         00198900     
1989                                                                         00199000     
1990            A file-type also shall define implicitly a type designated  a00199100     
1991            mode-type  having  exactly  two  values  which are designated00199200     
1992            Inspection and Generation.                                   00199300     
1993                                                                         00199400     
1994                                                                         00199500     
1995            NOTE:  The explicit denotation of these values is not part of00199600     
1996            the Pascal language.                                         00199700     
1997                                                                         00199800     
1998                                                                         00199900     
1999            A file-type shall be structured as three components.  Two  of00200000     
2000            these  components,  designatd  f.L  and  f.R, shall be of the00200100     
2001            implicit sequence-type.  The third component, designated f.M,00200200     
2002            shall be of the implicit mode-type.                          00200300     
2003                                                                         00200400     
2004                                                                         00200500     
2005            Let f.L and f.R each be a single value of the  sequence-type;00200600     
2006            let  f.M be a single value of the mode-type;  then each value00200700     
2007            of the file-type shall be a distinct triple of the form      00200800     
2008                                                                         00200900     
2009                                                                         00201000     
2010                                   (f.L, f.R, f.M)                       00201100     
2011                                                                         00201200     
2012                                                                         00201300     
2013            where f.R shall be the empty sequence if  f.M  is  the  value00201400     
2014            Generation.    The  value,  f,  of  the  file-type  shall  be00201500     
2015            designated  empty  if  and  only  if  f.L~f.R  is  the  empty00201600     
2016            sequence.                                                    00201700     
2017                                                                         00201800     
2018                                                                         00201900     
2019            NOTE:  The two components, f.L and f.R, of  a  value  of  the00202000     
2020            file-type  may be considered to represent the single sequence00202100     
2021            f.L~f.R together with a current position  in  that  sequence.00202200     
2022            If  f.R  is  non-empty,  then f.R.first may be considered the00202300     
2023            current component as  determined  by  the  current  position,00202400     
2024            otherwise, the current position is designated the end-of-file00202500     
2025            position.                                                    00202600     
2026                                                                         00202700     
2027                                                                         00202800     
2028            There shall be a file-type that is denoted  by  the  required00202900     
2029            structured-type-identifier  text.   The structure of the type00203000     
2030            denoted by text  shall  define  an  additional  sequence-type00203100     
2031            whose  values  shall  be designated lines.  A line shall be a00203200     
2032            sequence x~S(e), where x is a sequence of  components  having00203300     
2033            the  char-type,  and  e represents a special component value,00203400     
2034            which shall be designated an end-of-line, and which shall  be00203500     
2035            indistinguishable  from  the  char  value space except by the00203600     
2036            required  function  eoln  (6.6.6.5)  and  by   the   required00203700     
2037            procedures   reset   (6.6.5.2),  writeln  (6.9.5),  and  page00203800     
2038            (6.9.6).  If x is a line then no component of  x  other  than00203900     
2039                                                                         00204000     
2040                                                                         00204100     
2041                                                                         00204200     
2042                               DP7185                             PAGE 3500204300     
2043                                                                         00204400     
2044                                                                         00204500     
2045                                                                         00204600     
2046            x.last shall be an end-of-line.  This definition shall not be00204700     
2047            construed to determine the underlying representation, if any,00204800     
2048            of an end-of-line component used by a processor.             00204900     
2049                                                                         00205000     
2050                                                                         00205100     
2051            A line-sequence, z, shall be either the empty sequence or the00205200     
2052            sequence x~y where x is a line and y is a line-sequence.     00205300     
2053                                                                         00205400     
2054                                                                         00205500     
2055            Every value t of the type denoted by text shall  satisfy  one00205600     
2056            of the following two rules.                                  00205700     
2057                                                                         00205800     
2058                                                                         00205900     
2059            a) If  t.M  =   Inspection,   then   t.L~t.R   shall   be   a00206000     
2060               line-sequence.                                            00206100     
2061                                                                         00206200     
2062                                                                         00206300     
2063            b) If t.M = Generation, then t.L~t.R shall be x~y where x  is00206400     
2064               a  line-sequence  and y is a sequence of components having00206500     
2065               the char-type.                                            00206600     
2066                                                                         00206700     
2067                                                                         00206800     
2068               NOTE:  In rule (b), y may be considered, especially if  it00206900     
2069               is  non-empty,  to  be  a  partial  line  which  is  being00207000     
2070               generated.   Such  a  partial  line  cannot  occur  during00207100     
2071               inspection  of a file.  Also, y does not correspond to t.R00207200     
2072               since t.R is the empty sequence if t.M = Generation.      00207300     
2073                                                                         00207400     
2074                                                                         00207500     
2075            A variable that possesses the type denoted  by  the  required00207600     
2076            structured-type-identifier   text   shall   be  designated  a00207700     
2077            textfile.                                                    00207800     
2078                                                                         00207900     
2079                                                                         00208000     
2080            NOTE:  All required procedures and functions applicable to  a00208100     
2081            variable  of  type  file of char are applicable to textfiles.00208200     
2082            Additional required procedures and functions, applicable only00208300     
2083            to textfiles, are defined in 6.6.6.5 and 6.9.                00208400     
2084                                                                         00208500     
2085                                                                         00208600     
2086                                                                         00208700     
2087         6.4.4 POINTER-TYPES                                             00208800     
2088         -------------------                                             00208900     
2089                                                                         00209000     
2090                                                                         00209100     
2091         The  values  of  a  pointer-type  shall  consist  of  a   single00209200     
2092         nil-value, and a set of identifying-values  each  identifying  a00209300     
2093         distinct   variable   possessing   the   domain-type   of    the00209400     
2094         pointer-type. The set of identifying-values shall be dynamic, in00209500     
2095         that  the  variables and  the  values identifying  them,  may be00209600     
2096         created and  destroyed  during  the  execution  of  the program.00209700     
2097         Identifying-values and the variables identified by them shall be00209800     
2098         created only by the required procedure new (see 6.6.5.3).       00209900     
2099                                                                         00210000     
2100                                                                         00210100     
2101                                                                         00210200     
2102                               DP7185                             PAGE 3600210300     
2103                                                                         00210400     
2104                                                                         00210500     
2105                                                                         00210600     
2106         NOTE: Since the nil-value is not an  identifying-value  it  does00210700     
2107         not identify a variable.                                        00210800     
2108                                                                         00210900     
2109                                                                         00211000     
2110         The token nil shall denote the nil-value in all pointer-types.  00211100     
2111                                                                         00211200     
2112                                                                         00211300     
2113            pointer-type = new-pointer-type | pointer-type-identifier .  00211400     
2114            new-pointer-type = "^" domain-type .                         00211500     
2115            domain-type = type-identifier .                              00211600     
2116                                                                         00211700     
2117                                                                         00211800     
2118         NOTE: The token nil does not have a single type, but  assumes  a00211900     
2119         suitable pointer-type to  satisfy  the  assignment-compatibility00212000     
2120         rules, or the compatibility rules for operators, if possible.   00212100     
2121                                                                         00212200     
2122                                                                         00212300     
2123         6.4.5 COMPATIBLE TYPES                                          00212400     
2124         ----------------------                                          00212500     
2125                                                                         00212600     
2126                                                                         00212700     
2127         Types T1 and T2 shall be designated compatible  if  any  of  the00212800     
2128         four statements that follow is true.                            00212900     
2129                                                                         00213000     
2130                                                                         00213100     
2131            a)  T1 and T2 are the same type.                             00213200     
2132                                                                         00213300     
2133                                                                         00213400     
2134            b)  T1 is a subrange of T2, or T2 is a  subrange  of  T1,  or00213500     
2135                both T1 and T2 are subranges of the same host type.      00213600     
2136                                                                         00213700     
2137                                                                         00213800     
2138            c)  T1 and T2 are set-types  of  compatible  base-types,  and00213900     
2139                either both T1 and T2 are designated packed or neither T100214000     
2140                nor T2 is designated packed.                             00214100     
2141                                                                         00214200     
2142                                                                         00214300     
2143            d)  T1 and T2  are  string-types  with  the  same  number  of00214400     
2144                components.                                              00214500     
2145                                                                         00214600     
2146                                                                         00214700     
2147                                                                         00214800     
2148                                                                         00214900     
2149         6.4.6 ASSIGNMENT-COMPATIBILITY                                  00215000     
2150         ------------------------------                                  00215100     
2151                                                                         00215200     
2152                                                                         00215300     
2153         A value of type T2  shall  be  designated  assignment-compatible00215400     
2154         with  a  type  T1  if  any of the five statements that follow is00215500     
2155         true.                                                           00215600     
2156                                                                         00215700     
2157                                                                         00215800     
2158                                                                         00215900     
2159                                                                         00216000     
2160                                                                         00216100     
2161                                                                         00216200     
2162                               DP7185                             PAGE 3700216300     
2163                                                                         00216400     
2164                                                                         00216500     
2165                                                                         00216600     
2166            a)  T1 and T2 are the same type, which is neither a file-type00216700     
2167                nor a structured-type with a file component (this rule is00216800     
2168                to be interpreted recursively).                          00216900     
2169                                                                         00217000     
2170                                                                         00217100     
2171            b)  T1 is the real-type and T2 is the integer-type.          00217200     
2172                                                                         00217300     
2173                                                                         00217400     
2174            c)  T1 and T2 are compatible ordinal-types and the  value  of00217500     
2175                type  T2  is in the closed interval specified by the type00217600     
2176                T1.                                                      00217700     
2177                                                                         00217800     
2178                                                                         00217900     
2179            d)  T1 and T2 are compatible set-types and all the members of00218000     
2180                the value of type T2 are in the closed interval specified00218100     
2181                by the base-type of T1.                                  00218200     
2182                                                                         00218300     
2183                                                                         00218400     
2184            e)  T1 and T2 are compatible string-types.                   00218500     
2185                                                                         00218600     
2186                                                                         00218700     
2187         At any place where the rule of assignment-compatibility is used:00218800     
2188                                                                         00218900     
2189                                                                         00219000     
2190            a)  It shall  be  an  error  if  T1  and  T2  are  compatible00219100     
2191                ordinal-types  and  the  value  of  type T2 is not in the00219200     
2192                closed interval specified by the type T1.                00219300     
2193                                                                         00219400     
2194                                                                         00219500     
2195            b)  It shall be an error if T1  and  T2  are  compatible  set00219600     
2196                types  and  any  member of the value of type T2 is not in00219700     
2197                the closed interval specified by  the  base-type  of  the00219800     
2198                type T1.                                                 00219900     
2199                                                                         00220000     
2200                                                                         00220100     
2201                                                                         00220200     
2202                                                                         00220300     
2203         6.4.7 EXAMPLE OF A TYPE-DEFINITION-PART                         00220400     
2204         ---------------------------------------                         00220500     
2205                                                                         00220600     
2206                                                                         00220700     
2207           type                                                          00220800     
2208             natural = 0..maxint;                                        00220900     
2209             count = integer;                                            00221000     
2210             range = integer;                                            00221100     
2211             colour = (red, yellow, green, blue);                        00221200     
2212             sex = (male, female);                                       00221300     
2213             year = 1900..1999;                                          00221400     
2214             shape = (triangle, rectangle, circle);                      00221500     
2215             punchedcard = array[1..80] of char;                         00221600     
2216             charsequence = file of char;                                00221700     
2217             polar = record                                              00221800     
2218                       r : real;                                         00221900     
2219                                                                         00222000     
2220                                                                         00222100     
2221                                                                         00222200     
2222                               DP7185                             PAGE 3800222300     
2223                                                                         00222400     
2224                                                                         00222500     
2225                                                                         00222600     
2226                       theta : angle                                     00222700     
2227                     end;                                                00222800     
2228             indextype = 1..limit;                                       00222900     
2229             vector = array [indextype] of real;                         00223000     
2230             person = ^persondetails;                                    00223100     
2231             persondetails =                                             00223200     
2232                        record                                           00223300     
2233                          name, firstname : charsequence;                00223400     
2234                          age : integer;                                 00223500     
2235                          married : Boolean;                             00223600     
2236                          father, child, sibling : person;               00223700     
2237                          case s : sex of                                00223800     
2238                            male :                                       00223900     
2239                              (enlisted, bearded : Boolean);             00224000     
2240                            female :                                     00224100     
2241                              (mother,programmer : Boolean)              00224200     
2242                        end;                                             00224300     
2243             FileOfInteger = file of integer;                            00224400     
2244                                                                         00224500     
2245                                                                         00224600     
2246         NOTES:                                                          00224700     
2247                                                                         00224800     
2248                                                                         00224900     
2249               1.  In the above example count, range and  integer  denote00225000     
2250               the  same type.  The types denoted by year and natural are00225100     
2251               compatible with, but not the same as, the type denoted  by00225200     
2252               range, count and integer.                                 00225300     
2253                                                                         00225400     
2254                                                                         00225500     
2255               2.  Types occurring in examples in the remainder  of  this00225600     
2256               standard  should  be  assumed  to  have  been  declared as00225700     
2257               specified in 6.4.7.                                       00225800     
2258                                                                         00225900     
2259                                                                         00226000     
2260                                                                         00226100     
2261                                                                         00226200     
2262      6.5 DECLARATIONS AND DENOTATIONS OF VARIABLES                      00226300     
2263      ---------------------------------------------                      00226400     
2264                                                                         00226500     
2265                                                                         00226600     
2266         6.5.1 VARIABLE-DECLARATIONS                                     00226700     
2267         ---------------------------                                     00226800     
2268                                                                         00226900     
2269                                                                         00227000     
2270         A variable is an entity  to  which  a  (current)  value  may  be00227100     
2271         attributed    (see    6.8.2.2).     Each   identifier   in   the00227200     
2272         identifier-list  of  a  variable-declaration  shall   denote   a00227300     
2273         distinct   variable   possessing   the   type   denoted  by  the00227400     
2274         type-denoter of the variable-declaration.                       00227500     
2275                                                                         00227600     
2276                                                                         00227700     
2277            variable-declaration = identifier-list ":" type-denoter .    00227800     
2278                                                                         00227900     
2279                                                                         00228000     
2280                                                                         00228100     
2281                                                                         00228200     
2282                               DP7185                             PAGE 3900228300     
2283                                                                         00228400     
2284                                                                         00228500     
2285                                                                         00228600     
2286         The occurrence of an identifier  in  the  identifier-list  of  a00228700     
2287         variable-declaration of the variable-declaration-part of a block00228800     
2288         shall constitute its defining-point as a variable-identifier for00228900     
2289         the  region  that  is  the  block.   The structure of a variable00229000     
2290         possessing a structured-type  shall  be  the  structure  of  the00229100     
2291         structured-type.  A use of a variable-access shall be an access,00229200     
2292         at the time of the use, to  the  variable  thereby  denoted.   A00229300     
2293         variable-access,  according to whether it is an entire-variable,00229400     
2294         a   component-variable,    an    identified-variable,    or    a00229500     
2295         buffer-variable,  shall  denote either a declared variable, or a00229600     
2296         component of a variable, a variable which  is  identified  by  a00229700     
2297         pointer value (see 6.4.4), or a buffer-variable, respectively.  00229800     
2298                                                                         00229900     
2299                                                                         00230000     
2300           variable-access = entire-variable | component-variable |      00230100     
2301                             identified-variable | buffer-variable .     00230200     
2302                                                                         00230300     
2303                                                                         00230400     
2304         An assigning-reference to a variable shall occur if any  of  the00230500     
2305         six statements that follow is true.                             00230600     
2306                                                                         00230700     
2307                                                                         00230800     
2308         a) The  variable  is  denoted  by  the  variable-access  of   an00230900     
2309            assignment-statement.                                        00231000     
2310                                                                         00231100     
2311                                                                         00231200     
2312         b) The variable is denoted by an actual variable parameter in  a00231300     
2313            function-designator or procedure-statement.                  00231400     
2314                                                                         00231500     
2315                                                                         00231600     
2316         c) The  variable  is  denoted  by  an  actual  parameter  in   a00231700     
2317            procedure-statement  that  specifies  the  activation  of the00231800     
2318            required procedure read or the required procedure readln.    00231900     
2319                                                                         00232000     
2320                                                                         00232100     
2321         d) The  variable   occurs   as   the   control-variable   of   a00232200     
2322            for-statement.                                               00232300     
2323                                                                         00232400     
2324                                                                         00232500     
2325         e) A procedure-statement or  a  function-designator  contains  a00232600     
2326            procedure-identifier   associated   with   a  procedure-block00232700     
2327            containing an assigning-reference to the variable.           00232800     
2328                                                                         00232900     
2329                                                                         00233000     
2330         f) A procedure-statement or  a  function-designator  contains  a00233100     
2331            function-identifier    associated   with   a   function-block00233200     
2332            containing an assigning-reference to the variable.           00233300     
2333                                                                         00233400     
2334                                                                         00233500     
2335         Example of a variable-declaration-part                          00233600     
2336                                                                         00233700     
2337                                                                         00233800     
2338           var                                                           00233900     
2339                                                                         00234000     
2340                                                                         00234100     
2341                                                                         00234200     
2342                               DP7185                             PAGE 4000234300     
2343                                                                         00234400     
2344                                                                         00234500     
2345                                                                         00234600     
2346              x,y,z,max: real;                                           00234700     
2347              i,j: integer;                                              00234800     
2348              k: 0..9;                                                   00234900     
2349              p,q,r: Boolean;                                            00235000     
2350              operator: (plus, minus, times);                            00235100     
2351              a: array[0..63] of real;                                   00235200     
2352              c: colour;                                                 00235300     
2353              f: file of char;                                           00235400     
2354              hue1,hue2: set of colour;                                  00235500     
2355              p1,p2: person;                                             00235600     
2356              m,m1,m2 : array[1..10,1..10] of real;                      00235700     
2357              coord : polar;                                             00235800     
2358              pooltape : array[1..4] of FileOfInteger;                   00235900     
2359              date : record                                              00236000     
2360                       month : 1..12;                                    00236100     
2361                       year : integer                                    00236200     
2362                     end;                                                00236300     
2363                                                                         00236400     
2364                                                                         00236500     
2365         NOTE:  Variables occurring in examples in the remainder of  this00236600     
2366         standard should be assumed to have been declared as specified in00236700     
2367         6.5.1.                                                          00236800     
2368                                                                         00236900     
2369                                                                         00237000     
2370                                                                         00237100     
2371                                                                         00237200     
2372         6.5.2 ENTIRE-VARIABLES                                          00237300     
2373         ----------------------                                          00237400     
2374                                                                         00237500     
2375                                                                         00237600     
2376            entire-variable = variable-identifier .                      00237700     
2377            variable-identifier = identifier .                           00237800     
2378                                                                         00237900     
2379                                                                         00238000     
2380                                                                         00238100     
2381         6.5.3 COMPONENT-VARIABLES                                       00238200     
2382         -------------------------                                       00238300     
2383                                                                         00238400     
2384                                                                         00238500     
2385            6.5.3.1 GENERAL                                              00238600     
2386            ---------------                                              00238700     
2387                                                                         00238800     
2388                                                                         00238900     
2389            A  component  of  a  variable  shall  be   a   variable.    A00239000     
2390            component-variable shall denote a component of a variable.  A00239100     
2391            reference, assigning-reference or access to a component of  a00239200     
2392            variable shall constitute a reference, assigning-reference or00239300     
2393            access, respectively, to the variable.  The value, if any, of00239400     
2394            the  component  of  a variable shall be the same component of00239500     
2395            the value, if any, of the variable.                          00239600     
2396                                                                         00239700     
2397                                                                         00239800     
2398                                                                         00239900     
2399                                                                         00240000     
2400                                                                         00240100     
2401                                                                         00240200     
2402                               DP7185                             PAGE 4100240300     
2403                                                                         00240400     
2404                                                                         00240500     
2405                                                                         00240600     
2406              component-variable = indexed-variable |                    00240700     
2407                                   field-designator .                    00240800     
2408                                                                         00240900     
2409                                                                         00241000     
2410                                                                         00241100     
2411            6.5.3.2 INDEXED-VARIABLES                                    00241200     
2412            -------------------------                                    00241300     
2413                                                                         00241400     
2414                                                                         00241500     
2415            A component of a variable possessing an array-type  shall  be00241600     
2416            denoted by an indexed-variable.                              00241700     
2417                                                                         00241800     
2418                                                                         00241900     
2419              indexed-variable =                                         00242000     
2420                   array-variable "[" index-expression                   00242100     
2421                                  { "," index expression } "]" .         00242200     
2422              array-variable = variable-access .                         00242300     
2423              index-expression = expression .                            00242400     
2424                                                                         00242500     
2425                                                                         00242600     
2426            An array-variable shall be a variable-access that  denotes  a00242700     
2427            variable  possessing  an array-type.  For an indexed-variable00242800     
2428            closest-containing a single index-expression,  the  value  of00242900     
2429            the  index-expression shall be assignment-compatible with the00243000     
2430            index-type of the array-type.  The component denoted  by  the00243100     
2431            indexed-variable  shall  be the component that corresponds to00243200     
2432            the value of the index-expression by the mapping of the  type00243300     
2433            possessed by the array-variable (see 6.4.3.2).               00243400     
2434                                                                         00243500     
2435                                                                         00243600     
2436            Examples:                                                    00243700     
2437                                                                         00243800     
2438                                                                         00243900     
2439                      a[12]                                              00244000     
2440                      a[i+j]                                             00244100     
2441                      m[k]                                               00244200     
2442                                                                         00244300     
2443                                                                         00244400     
2444            If  the  array-variable  is  itself  an  indexed-variable  an00244500     
2445            abbreviation  may be used.  In the abbreviated form, a single00244600     
2446            comma shall replace the sequence "]" "[" that occurs  in  the00244700     
2447            full  form.   The abbreviated form and the full form shall be00244800     
2448            equivalent.                                                  00244900     
2449                                                                         00245000     
2450                                                                         00245100     
2451            Examples:                                                    00245200     
2452                                                                         00245300     
2453                                                                         00245400     
2454                      m[k][1]                                            00245500     
2455                      m[k,1]                                             00245600     
2456                                                                         00245700     
2457                                                                         00245800     
2458            NOTE:  The two examples denote the same component variable.  00245900     
2459                                                                         00246000     
2460                                                                         00246100     
2461                                                                         00246200     
2462                               DP7185                             PAGE 4200246300     
2463                                                                         00246400     
2464                                                                         00246500     
2465                                                                         00246600     
2466            6.5.3.3 FIELD-DESIGNATORS                                    00246700     
2467            -------------------------                                    00246800     
2468                                                                         00246900     
2469                                                                         00247000     
2470            A field-designator either shall denote that component of  the00247100     
2471            record-variable  of  the field-designator which is associated00247200     
2472            with the  field-identifier  of  the  field-specifier  of  the00247300     
2473            field-designator,   by   the  record-type  possessed  by  the00247400     
2474            record-variable;  or shall denote the variable denoted by the00247500     
2475            field-designator-identifier    (see    6.8.3.10)    of    the00247600     
2476            field-designator.    A    record-variable    shall    be    a00247700     
2477            variable-access   that   denotes   a  variable  possessing  a00247800     
2478            record-type.                                                 00247900     
2479                                                                         00248000     
2480                                                                         00248100     
2481            The occurrence of a  record-variable  in  a  field-designator00248200     
2482            shall  constitute the defining-point of the field-identifiers00248300     
2483            associated with components of the  record-type  possessed  by00248400     
2484            the   record-variable,   for   the   region   that   is   the00248500     
2485            field-specifier of the field-designator.                     00248600     
2486                                                                         00248700     
2487                                                                         00248800     
2488              field-designator = record-variable "." field-specifier |   00248900     
2489                                 field-designator-identifier .           00249000     
2490              record-variable = variable-access .                        00249100     
2491              field-specifier = field-identifier .                       00249200     
2492              field-identifier = identifier .                            00249300     
2493                                                                         00249400     
2494                                                                         00249500     
2495            Examples:                                                    00249600     
2496                                                                         00249700     
2497                      p2^.mother                                         00249800     
2498                      coord.theta                                        00249900     
2499                                                                         00250000     
2500                                                                         00250100     
2501            An access to a component of  a  variant  of  a  variant-part,00250200     
2502            where  the selector of the variant-part is not a field, shall00250300     
2503            attribute to the selector that value specified  by  its  type00250400     
2504            which is associated with the variant.                        00250500     
2505                                                                         00250600     
2506                                                                         00250700     
2507            It shall be an error unless  a  variant  is  active  for  the00250800     
2508            entirety  of  each  reference and access to each component of00250900     
2509            the variant.                                                 00251000     
2510                                                                         00251100     
2511                                                                         00251200     
2512            When a variant becomes not  active,  all  of  its  components00251300     
2513            shall become totally-undefined.                              00251400     
2514                                                                         00251500     
2515                                                                         00251600     
2516            NOTE:  If the selector of a variant-part is  undefined,  then00251700     
2517            no variant of the variant-part is active.                    00251800     
2518                                                                         00251900     
2519                                                                         00252000     
2520                                                                         00252100     
2521                                                                         00252200     
2522                               DP7185                             PAGE 4300252300     
2523                                                                         00252400     
2524                                                                         00252500     
2525                                                                         00252600     
2526         6.5.4 IDENTIFIED-VARIABLES                                      00252700     
2527         --------------------------                                      00252800     
2528                                                                         00252900     
2529                                                                         00253000     
2530         An  identified-variable  shall  denote  the  variable  (if  any)00253100     
2531         identified   by  the  value  of  the  pointer-variable  of   the00253200     
2532         identified-variable (see 6.4.4 and 6.6.5.3).                    00253300     
2533                                                                         00253400     
2534                                                                         00253500     
2535              identified-variable = pointer-variable "^" .               00253600     
2536              pointer-variable = variable-access .                       00253700     
2537                                                                         00253800     
2538                                                                         00253900     
2539         A  variable created by the required procedure new  (see 6.6.5.3)00254000     
2540         shall  be accessible until the termination of the activation  of00254100     
2541         the  program-block  or until the variable is  made  inaccessible00254200     
2542         (see the required procedure, 6.6.5.3).                          00254300     
2543                                                                         00254400     
2544                                                                         00254500     
2545         NOTE: The accessibility of the variable  also  depends  on   the00254600     
2546         existence  of a pointer-variable which has attributed to it  the00254700     
2547         corresponding identifying value.                                00254800     
2548                                                                         00254900     
2549                                                                         00255000     
2550         A  pointer-variable  shall be a variable-access that  denotes  a00255100     
2551         variable possessing a pointer-type. It shall be an error if  the00255200     
2552         pointer-variable  of  an identified-variable  either  denotes  a00255300     
2553         nil-value or is undefined. It shall be an error to  remove  from00255400     
2554         its pointer-type the identifying-value of an identified variable00255500     
2555         (see 6.6.5.3)  when  a  reference  to  the  identified  variable00255600     
2556         exists.                                                         00255700     
2557                                                                         00255800     
2558                                                                         00255900     
2559         Examples:                                                       00256000     
2560                                                                         00256100     
2561                   p1^                                                   00256200     
2562                   p1^.father^                                           00256300     
2563                   p1^.sibling^.father^                                  00256400     
2564                                                                         00256500     
2565                                                                         00256600     
2566                                                                         00256700     
2567         6.5.5 BUFFER-VARIABLES                                          00256800     
2568         ----------------------                                          00256900     
2569                                                                         00257000     
2570                                                                         00257100     
2571         A file-variable  shall  be  a  variable-access  that  denotes  a00257200     
2572         variable possessing a file-type.  A buffer-variable shall denote00257300     
2573         a  variable  associated  with  the  variable  denoted   by   the00257400     
2574         file-variable   of   the   buffer-variable.   A  buffer-variable00257500     
2575         associated  with  a  textfile  shall  possess   the   char-type;00257600     
2576         otherwise, a buffer-variable shall possess the component-type of00257700     
2577         the  file-type   possessed   by   the   file-variable   of   the00257800     
2578                                                                         00257900     
2579                                                                         00258000     
2580                                                                         00258100     
2581                                                                         00258200     
2582                               DP7185                             PAGE 4400258300     
2583                                                                         00258400     
2584                                                                         00258500     
2585                                                                         00258600     
2586         buffer-variable.                                                00258700     
2587                                                                         00258800     
2588                                                                         00258900     
2589              buffer-variable = file-variable "^" .                      00259000     
2590              file-variable = variable-access .                          00259100     
2591                                                                         00259200     
2592                                                                         00259300     
2593         Examples:                                                       00259400     
2594                                                                         00259500     
2595                                                                         00259600     
2596              input^                                                     00259700     
2597              pooltape[2]^                                               00259800     
2598                                                                         00259900     
2599                                                                         00260000     
2600         It shall be an error to alter the value  of  a  file-variable  f00260100     
2601         when  a reference to the buffer-variable f^ exists.  A reference00260200     
2602         or access to a buffer-variable shall constitute a  reference  or00260300     
2603         access, respectively, to the associated file-variable.          00260400     
2604                                                                         00260500     
2605                                                                         00260600     
2606                                                                         00260700     
2607      6.6 PROCEDURE AND FUNCTION DECLARATIONS                            00260800     
2608      ---------------------------------------                            00260900     
2609                                                                         00261000     
2610                                                                         00261100     
2611         6.6.1 PROCEDURE-DECLARATIONS                                    00261200     
2612         ----------------------------                                    00261300     
2613                                                                         00261400     
2614                                                                         00261500     
2615         A procedure-declaration shall associate  an  identifier  with  a00261600     
2616         procedure-block   so   that   it   can   be   activated   by   a00261700     
2617         procedure-statement.  Activation of the procedure shall activate00261800     
2618         the procedure-block.                                            00261900     
2619                                                                         00262000     
2620                                                                         00262100     
2621            procedure-declaration =                                      00262200     
2622               procedure-heading ";" directive |                         00262300     
2623               procedure-identification ";" procedure-block |            00262400     
2624               procedure-heading ";" procedure-block .                   00262500     
2625            procedure-heading =                                          00262600     
2626               "procedure" identifier [ formal-parameter-list ] .        00262700     
2627            procedure-identification =                                   00262800     
2628               "procedure" procedure-identifier .                        00262900     
2629            procedure-identifier = identifier .                          00263000     
2630            procedure-block = block .                                    00263100     
2631                                                                         00263200     
2632                                                                         00263300     
2633         The occurrence of a formal-parameter-list in a procedure-heading00263400     
2634         of a procedure-declaration shall define the formal parameters of00263500     
2635         the procedure-block, if any, associated with the  identifier  of00263600     
2636         the procedure-heading to be those of the formal-parameter-list. 00263700     
2637                                                                         00263800     
2638                                                                         00263900     
2639                                                                         00264000     
2640                                                                         00264100     
2641                                                                         00264200     
2642                               DP7185                             PAGE 4500264300     
2643                                                                         00264400     
2644                                                                         00264500     
2645                                                                         00264600     
2646         The occurrence of an identifier in the  procedure-heading  of  a00264700     
2647         procedure-declaration  shall  constitute its defining-point as a00264800     
2648         procedure-identifier  for  the  region   that   is   the   block00264900     
2649         closest-containing the the procedure-declaration.               00265000     
2650                                                                         00265100     
2651                                                                         00265200     
2652         Each    identifier    having    a    defining-point     as     a00265300     
2653         procedure-identifier     in    a    procedure-heading    of    a00265400     
2654         procedure-declaration closest-containing the directive "forward"00265500     
2655         shall  have  exactly  one  of its corresponding occurrences in a00265600     
2656         procedure-identification of a  procedure-declaration,  and  that00265700     
2657         shall be in the same procedure-and-function-declaration-part.   00265800     
2658                                                                         00265900     
2659                                                                         00266000     
2660         The occurrence of a procedure-block in  a  procedure-declaration00266100     
2661         associates  the  procedure-block  with  the  identifier  in  the00266200     
2662         procedure-heading,  or  with  the  procedure-identifier  in  the00266300     
2663         procedure-identification, of the procedure-declaration.         00266400     
2664                                                                         00266500     
2665                                                                         00266600     
2666         Example of procedure-and-function-declaration-part:             00266700     
2667                                                                         00266800     
2668                                                                         00266900     
2669           procedure readinteger (var f: text; var x: integer);          00267000     
2670           var                                                           00267100     
2671             i : natural;                                                00267200     
2672           begin                                                         00267300     
2673             while f^ = ' ' do get(f);                                   00267400     
2674             {The file buffer contains the first non-space char}         00267500     
2675             i := 0;                                                     00267600     
2676             while f^ in ['0'..'9'] do begin                             00267700     
2677               i := (10*i) + (ord(f^) - ord('0'));                       00267800     
2678               get(f)                                                    00267900     
2679             end;                                                        00268000     
2680             {The file buffer contains a non-digit}                      00268100     
2681             x := i                                                      00268200     
2682             {Of course if there are no digits, x is zero}               00268300     
2683           end;                                                          00268400     
2684                                                                         00268500     
2685           procedure AddVectors(var A,B,C:                               00268600     
2686                                  array[low..high: natural] of real);    00268700     
2687           var                                                           00268800     
2688             i : natural;                                                00268900     
2689           begin                                                         00269000     
2690             for i := low to high do A[i] := B[i] + C[i]                 00269100     
2691           end { of AddVectors };                                        00269200     
2692                                                                         00269300     
2693           procedure bisect(function f(x : real) : real;                 00269400     
2694                            a,b : real;                                  00269500     
2695                            var result : real);                          00269600     
2696           {This procedure attempts to find a zero of                    00269700     
2697            f(x) in (a,b) by the method of bisection.  It                00269800     
2698            is assumed that the procedure is called with                 00269900     
2699                                                                         00270000     
2700                                                                         00270100     
2701                                                                         00270200     
2702                               DP7185                             PAGE 4600270300     
2703                                                                         00270400     
2704                                                                         00270500     
2705                                                                         00270600     
2706            suitable values of a and b such that                         00270700     
2707               (f(a)<0) and (f(b)>0)                                     00270800     
2708            The estimate is returned in the last parameter.}             00270900     
2709           const                                                         00271000     
2710             Eps = 1e-10;                                                00271100     
2711           var                                                           00271200     
2712             midpoint : real;                                            00271300     
2713           begin                                                         00271400     
2714             {The invariant P is true by calling assumption}             00271500     
2715             midpoint := a;                                              00271600     
2716             while abs(a-b) > Eps*abs(a) do begin                        00271700     
2717               midpoint := (a+b)/2;                                      00271800     
2718               if f(midpoint) < 0 then a := midpoint                     00271900     
2719               else b := midpoint                                        00272000     
2720               {Which re-establishes the invariant:                      00272100     
2721                    P = (f(a)<0) and (f(b)>0)                            00272200     
2722                and reduces the interval (a,b) provided                  00272300     
2723                that the value of midpoint is distinct                   00272400     
2724                from both a and b.}                                      00272500     
2725             end;                                                        00272600     
2726             {P together with the loop exit condition assures            00272700     
2727              that a zero is contained in a small sub-interval.          00272800     
2728              Return the midpoint as the zero.}                          00272900     
2729             result := midpoint                                          00273000     
2730           end;                                                          00273100     
2731                                                                         00273200     
2732           procedure PrepareForAppending(var f: FileOfInteger);          00273300     
2733           {This procedure takes a file in an arbitrary                  00273400     
2734            state and sets it up in a condition for                      00273500     
2735            appending data to its end.  Simpler conditioning             00273600     
2736            is only possible if assumptions are made about               00273700     
2737            the initial state of the file.}                              00273800     
2738           var                                                           00273900     
2739             LocalCopy : FileOfInteger;                                  00274000     
2740                                                                         00274100     
2741             procedure CopyFiles(var from,into : FileOfInteger);         00274200     
2742             begin                                                       00274300     
2743               reset(from); rewrite(into);                               00274400     
2744               while not eof(from) do begin                              00274500     
2745                 into^ := from^;                                         00274600     
2746                 put(into); get(from)                                    00274700     
2747               end;                                                      00274800     
2748             end {of CopyFiles};                                         00274900     
2749                                                                         00275000     
2750           begin {of body of PrepareForAppending}                        00275100     
2751             CopyFiles(f,LocalCopy);                                     00275200     
2752             CopyFiles(LocalCopy,f)                                      00275300     
2753           end {of PrepareForAppending};                                 00275400     
2754                                                                         00275500     
2755                                                                         00275600     
2756                                                                         00275700     
2757                                                                         00275800     
2758                                                                         00275900     
2759                                                                         00276000     
2760                                                                         00276100     
2761                                                                         00276200     
2762                               DP7185                             PAGE 4700276300     
2763                                                                         00276400     
2764                                                                         00276500     
2765                                                                         00276600     
2766         6.6.2 FUNCTION-DECLARATIONS                                     00276700     
2767         ---------------------------                                     00276800     
2768                                                                         00276900     
2769                                                                         00277000     
2770         A function-declaration shall  associate  an  identifier  with  a00277100     
2771         function-block    so   that   it   can   be   activated   by   a00277200     
2772         function-designator.  Activation of the function shall  activate00277300     
2773         the function-block.                                             00277400     
2774                                                                         00277500     
2775                                                                         00277600     
2776             function-declaration =                                      00277700     
2777               function-heading ";" directive |                          00277800     
2778               function-identification ";" function-block |              00277900     
2779               function-heading ";" function-block .                     00278000     
2780             function-heading =                                          00278100     
2781               "function" identifier [formal-parameter-list]             00278200     
2782               ":" result-type .                                         00278300     
2783             function-identification =                                   00278400     
2784               "function" function-identifier .                          00278500     
2785             function-identifier = identifier .                          00278600     
2786             result-type = simple-type-identifier |                      00278700     
2787                           pointer-type-identifier .                     00278800     
2788             function-block = block .                                    00278900     
2789                                                                         00279000     
2790                                                                         00279100     
2791         The occurrence of a formal-parameter-list in a  function-heading00279200     
2792         of  a function-declaration shall define the formal parameters of00279300     
2793         the function-block, if any, associated with  the  identifier  of00279400     
2794         the  function-heading  to be those of the formal-parameter-list.00279500     
2795         The    function-block    shall    contain    at    least     one00279600     
2796         assignment-statement    that   attributes   a   value   to   the00279700     
2797         function-identifier (see 6.8.2.2).  The value  of  the  function00279800     
2798         shall  be  the last value attributed to the function-identifier.00279900     
2799         It  shall  be  an  error  if  the  function  is  undefined  upon00280000     
2800         completion   of   the   algorithm   of   an  activation  of  the00280100     
2801         function-block.                                                 00280200     
2802                                                                         00280300     
2803                                                                         00280400     
2804         The occurrence of an identifier in  the  function-heading  of  a00280500     
2805         function-declaration  shall  constitute  its defining-point as a00280600     
2806         function-identifier  possessing  the   type   denoted   by   the00280700     
2807         result-type  for the region that is the block closest-containing00280800     
2808         the the function-declaration.                                   00280900     
2809                                                                         00281000     
2810                                                                         00281100     
2811         Each identifier having a defining-point as a function-identifier00281200     
2812         in    the    function-heading    of    a    function-declaration00281300     
2813         closest-containing the directive "forward"  shall  have  exactly00281400     
2814         one     of     its     corresponding     occurrences     in    a00281500     
2815         function-identification  of  a  function-declaration,  and  that00281600     
2816         shall be in the same procedure-and-function-declaration-part.   00281700     
2817                                                                         00281800     
2818                                                                         00281900     
2819                                                                         00282000     
2820                                                                         00282100     
2821                                                                         00282200     
2822                               DP7185                             PAGE 4800282300     
2823                                                                         00282400     
2824                                                                         00282500     
2825                                                                         00282600     
2826         The occurrence of a  function-block  in  a  function-declaration00282700     
2827         associates   the  function-block  with  the  identifier  in  the00282800     
2828         function-heading,  or  with  the  function-identifier   in   the00282900     
2829         function-identification, of the function-declaration.           00283000     
2830                                                                         00283100     
2831                                                                         00283200     
2832         Example of a procedure-and-function-declaration-part            00283300     
2833                                                                         00283400     
2834                                                                         00283500     
2835           function Sqrt(x:real): real;                                  00283600     
2836           {This function computes the square root of x (x>0)            00283700     
2837           using Newton's method.}                                       00283800     
2838           var                                                           00283900     
2839             old,new: real;                                              00284000     
2840           begin                                                         00284100     
2841             new := x;                                                   00284200     
2842             repeat                                                      00284300     
2843               old := new;                                               00284400     
2844               new := (old + x/old)*0.5;                                 00284500     
2845             until abs(new-old) < Eps*new;                               00284600     
2846             {Eps being a global constant}                               00284700     
2847             Sqrt := new                                                 00284800     
2848           end {of Sqrt};                                                00284900     
2849                                                                         00285000     
2850           function max(a: vector;): real;                               00285100     
2851           {This function finds the largest component                    00285200     
2852           of the value of a.}                                           00285300     
2853           var                                                           00285400     
2854             largestsofar: real;                                         00285500     
2855             fence: indextype;                                           00285600     
2856           begin                                                         00285700     
2857             largestsofar := a[1];                                       00285800     
2858             {Establishes largestsofar = max(a[1])}                      00285900     
2859             for fence := 2 to limit do begin                            00286000     
2860               if largestsofar < a[fence] then largestsofar := a[fence]  00286100     
2861               {Re-establishing largestsofar = max(a[1], ... ,           00286200     
2862                a[fence])}                                               00286300     
2863             end;                                                        00286400     
2864             {So now largestsofar = max(a[1], ... ,a[limit])}            00286500     
2865             max := largestsofar                                         00286600     
2866           end {of max};                                                 00286700     
2867                                                                         00286800     
2868           function GCD(m,n: natural): natural;                          00286900     
2869           begin                                                         00287000     
2870             if n=0 then GCD := m                                        00287100     
2871             else GCD := GCD(n,m mod n);                                 00287200     
2872           end;                                                          00287300     
2873                                                                         00287400     
2874           {This example of the use of forward demonstrates              00287500     
2875           how mutual recursion is helpful in reading a                  00287600     
2876           parenthesized expression and converting it                    00287700     
2877           to some internal form}                                        00287800     
2878           function ReadOperand : formula; forward;                      00287900     
2879                                                                         00288000     
2880                                                                         00288100     
2881                                                                         00288200     
2882                               DP7185                             PAGE 4900288300     
2883                                                                         00288400     
2884                                                                         00288500     
2885                                                                         00288600     
2886                                                                         00288700     
2887           function ReadExpression : formula;                            00288800     
2888             var                                                         00288900     
2889               this : formula;                                           00289000     
2890             begin                                                       00289100     
2891             this := ReadOperand;                                        00289200     
2892             while IsOperator(nextsym) do                                00289300     
2893               this := MakeFormula(this, ReadOperator,                   00289400     
2894                                     ReadOperand);                       00289500     
2895             ReadExpression := this                                      00289600     
2896           end;                                                          00289700     
2897                                                                         00289800     
2898           function ReadOperand { : formula };                           00289900     
2899             begin                                                       00290000     
2900             if IsOpen(nextsym) then                                     00290100     
2901               begin                                                     00290200     
2902               SkipSymbol;                                               00290300     
2903               ReadOperand := ReadExpression;                            00290400     
2904               {nextsym should be a close}                               00290500     
2905               SkipSymbol                                                00290600     
2906               end                                                       00290700     
2907             else ReadOperand := ReadElement                             00290800     
2908             end;                                                        00290900     
2909                                                                         00291000     
2910                                                                         00291100     
2911                                                                         00291200     
2912         6.6.3 PARAMETERS                                                00291300     
2913         ----------------                                                00291400     
2914                                                                         00291500     
2915                                                                         00291600     
2916            6.6.3.1 GENERAL                                              00291700     
2917            ---------------                                              00291800     
2918                                                                         00291900     
2919                                                                         00292000     
2920            The identifier-list in a value-parameter-specification  shall00292100     
2921            be  a  list  of  value  parameters.  The identifier-list in a00292200     
2922            variable-parameter-specification shall be a list of  variable00292300     
2923            parameters.                                                  00292400     
2924                                                                         00292500     
2925                                                                         00292600     
2926              formal-parameter-list =                                    00292700     
2927                     "(" formal-parameter-section                        00292800     
2928                     {";" formal-parameter-section} ")" .                00292900     
2929              formal-parameter-section >                                 00293000     
2930                     value-parameter-specification |                     00293100     
2931                     variable-parameter-specification |                  00293200     
2932                     procedural-parameter-specification |                00293300     
2933                     functional-parameter-specification .                00293400     
2934                                                                         00293500     
2935                                                                         00293600     
2936              NOTE: There    is     also     a     syntax     rule    for00293700     
2937              formal-parameter-section in 6.6.3.7                        00293800     
2938                                                                         00293900     
2939                                                                         00294000     
2940                                                                         00294100     
2941                                                                         00294200     
2942                               DP7185                             PAGE 5000294300     
2943                                                                         00294400     
2944                                                                         00294500     
2945                                                                         00294600     
2946              value-parameter-specification =                            00294700     
2947                     identifier-list ":" type-identifier .               00294800     
2948              variable-parameter-specification =                         00294900     
2949                     "var" identifier-list ":" type-identifier .         00295000     
2950              procedural-parameter-specification =                       00295100     
2951                     procedure-heading .                                 00295200     
2952              functional-parameter-specification =                       00295300     
2953                     function-heading .                                  00295400     
2954                                                                         00295500     
2955                                                                         00295600     
2956            An  identifier that is defined to be  a  parameter-identifier00295700     
2957            for the  region  which  is  the  formal-parameter-list  of  a00295800     
2958            procedure-heading shall be designated a formal  parameter  of00295900     
2959            the block of the procedure-block, if any, associated with the00296000     
2960            identifier of the procedure-heading.  An identifier  that  is00296100     
2961            defined  to be a parameter-identifier for the region which is00296200     
2962            the formal-parameter-list  of  a  function-heading  shall  be00296300     
2963            designated   a   formal   parameter   of  the  block  of  the00296400     
2964            function-block, if any, associated with the identifier of the00296500     
2965            function-heading.                                            00296600     
2966                                                                         00296700     
2967                                                                         00296800     
2968            The occurrence of an identifier in the identifier-list  of  a00296900     
2969            value-parameter-specification               or              a00297000     
2970            variable-parameter-specification   shall    constitute    its00297100     
2971            defining-point  as a parameter-identifier for the region that00297200     
2972            is the formal-parameter-list closest-containing  it  and  its00297300     
2973            defining-point  as the associated variable-identifier for the00297400     
2974            region that is the block, if any, of which  it  is  a  formal00297500     
2975            parameter.                                                   00297600     
2976                                                                         00297700     
2977                                                                         00297800     
2978            The occurrence of the identifier of a procedure-heading in  a00297900     
2979            procedural-parameter-specification   shall   constitute   its00298000     
2980            defining-point as a parameter-identifier for the region  that00298100     
2981            is  the  formal-parameter-list  closest-containing it and its00298200     
2982            defining-point as the associated procedure-identifier for the00298300     
2983            region  that  is  the  block, if any, of which it is a formal00298400     
2984            parameter.                                                   00298500     
2985                                                                         00298600     
2986                                                                         00298700     
2987            The occurrence of the identifier of a function-heading  in  a00298800     
2988            functional-parameter-specification   shall   constitute   its00298900     
2989            defining-point as a parameter-identifier for the region  that00299000     
2990            is  the  formal-parameter-list  closest-containing it and its00299100     
2991            defining-point as the associated function-identifier for  the00299200     
2992            region  that  is  the  block, if any, of which it is a formal00299300     
2993            parameter.                                                   00299400     
2994                                                                         00299500     
2995                                                                         00299600     
2996            NOTE:  If  the  formal-parameter-list  is  contained   in   a00299700     
2997            procedural-parameter-specification            or            a00299800     
2998            functional-parameter-specification, there is no corresponding00299900     
2999                                                                         00300000     
3000                                                                         00300100     
3001                                                                         00300200     
3002                               DP7185                             PAGE 5100300300     
3003                                                                         00300400     
3004                                                                         00300500     
3005                                                                         00300600     
3006            procedure-block or function-block.                           00300700     
3007                                                                         00300800     
3008                                                                         00300900     
3009                                                                         00301000     
3010            6.6.3.2 VALUE PARAMETERS                                     00301100     
3011            ------------------------                                     00301200     
3012                                                                         00301300     
3013                                                                         00301400     
3014            The formal parameter and its  associated  variable-identifier00301500     
3015            shall  denote  the same variable.  The formal parameter shall00301600     
3016            possess the  type  denoted  by  the  type-identifier  of  the00301700     
3017            value-parameter-specification.    The  actual-parameter  (see00301800     
3018            6.7.3 and 6.8.2.3) shall be  an  expression  whose  value  is00301900     
3019            assignment-compatible  with  the type possessed by the formal00302000     
3020            parameter.  The current value  of  the  expression  shall  be00302100     
3021            attributed  upon activation of the block to the variable that00302200     
3022            is denoted by the formal parameter.                          00302300     
3023                                                                         00302400     
3024                                                                         00302500     
3025                                                                         00302600     
3026            6.6.3.3 VARIABLE PARAMETERS                                  00302700     
3027            ---------------------------                                  00302800     
3028                                                                         00302900     
3029                                                                         00303000     
3030            The  actual-parameter  shall  be  a   variable-access.    The00303100     
3031            actual-parameters  (see  6.7.3  and 6.8.2.3) corresponding to00303200     
3032            formal    parameters    that    occur     in     a     single00303300     
3033            variable-parameter-specification  shall  all possess the same00303400     
3034            type.  The type possessed by the actual-parameters  shall  be00303500     
3035            the  same  as  that  denoted  by the type-identifier, and the00303600     
3036            formal  parameters  shall  also  possess  that   type.    The00303700     
3037            actual-parameter  shall  be accessed before the activation of00303800     
3038            the block, and this access shall establish a reference to the00303900     
3039            variable thereby accessed during the entire activation of the00304000     
3040            block;  the corresponding formal parameter and its associated00304100     
3041            variable-identifier  shall  denote  the  referenced  variable00304200     
3042            during the activation.                                       00304300     
3043                                                                         00304400     
3044                                                                         00304500     
3045            An actual variable parameter shall not denote a  field  which00304600     
3046            is  the  selector  of  a  variant-part.   An  actual variable00304700     
3047            parameter shall not denote a component  of  a  variable  that00304800     
3048            possesses a type that is designated packed.                  00304900     
3049                                                                         00305000     
3050                                                                         00305100     
3051                                                                         00305200     
3052            6.6.3.4 PROCEDURAL PARAMETERS                                00305300     
3053            -----------------------------                                00305400     
3054                                                                         00305500     
3055                                                                         00305600     
3056            The actual-parameter (see  6.7.3  and  6.8.2.3)  shall  be  a00305700     
3057            procedure-identifier  that  has a defining-point contained by00305800     
3058            the   program-block.    The   procedure   denoted   by    the00305900     
3059                                                                         00306000     
3060                                                                         00306100     
3061                                                                         00306200     
3062                               DP7185                             PAGE 5200306300     
3063                                                                         00306400     
3064                                                                         00306500     
3065                                                                         00306600     
3066            actual-parameter  and  the  procedure  denoted  by the formal00306700     
3067            parameter shall have  congruous  formal-parameter-lists  (see00306800     
3068            6.6.3.6)  if  either has a formal-parameter-list.  The formal00306900     
3069            parameter  and  its  associated  procedure-identifier   shall00307000     
3070            denote  the  actual parameter during the entire activation of00307100     
3071            the block.                                                   00307200     
3072                                                                         00307300     
3073                                                                         00307400     
3074                                                                         00307500     
3075                                                                         00307600     
3076            6.6.3.5 FUNCTIONAL PARAMETERS                                00307700     
3077            -----------------------------                                00307800     
3078                                                                         00307900     
3079                                                                         00308000     
3080            The actual-parameter (see  6.7.3  and  6.8.2.3)  shall  be  a00308100     
3081            function-identifier  that  has  a defining-point contained by00308200     
3082            the   program-block.    The   function   denoted    by    the00308300     
3083            actual-parameter  and  the  function  denoted  by  the formal00308400     
3084            parameter shall have the  same  result-type  and  shall  have00308500     
3085            congruous  formal-parameter-lists (see 6.6.3.6) if either has00308600     
3086            a  formal-parameter-list.   The  formal  parameter  and   its00308700     
3087            associated   function-identifier   shall  denote  the  actual00308800     
3088            parameter during the entire activation of the block.         00308900     
3089                                                                         00309000     
3090                                                                         00309100     
3091                                                                         00309200     
3092                                                                         00309300     
3093            6.6.3.6 PARAMETER LIST CONGRUITY                             00309400     
3094            --------------------------------                             00309500     
3095                                                                         00309600     
3096                                                                         00309700     
3097            Two formal-parameter-lists shall be congruous if they contain00309800     
3098            the  same  number  of  formal-parameter-sections  and  if the00309900     
3099            formal-parameter-sections in corresponding  positions  match.00310000     
3100            Two  formal-parameter-sections  shall  match  if  any  of the00310100     
3101            statements that follow is true.                              00310200     
3102                                                                         00310300     
3103                                                                         00310400     
3104                a)  They    are    both    value-parameter-specifications00310500     
3105                    containing  the  same  number  of  parameters and the00310600     
3106                    type-identifier in each value-parameter-specification00310700     
3107                    denotes the same type.                               00310800     
3108                                                                         00310900     
3109                                                                         00311000     
3110                b)  They   are   both   variable-parameter-specifications00311100     
3111                    containing  the  same  number  of  parameters and the00311200     
3112                    type-identifier                in                each00311300     
3113                    variable-parameter-specification   denotes  the  same00311400     
3114                    type.                                                00311500     
3115                                                                         00311600     
3116                                                                         00311700     
3117                c)  They are both procedural-parameter-specifications and00311800     
3118                    the  formal-parameter-lists of the procedure-headings00311900     
3119                                                                         00312000     
3120                                                                         00312100     
3121                                                                         00312200     
3122                               DP7185                             PAGE 5300312300     
3123                                                                         00312400     
3124                                                                         00312500     
3125                                                                         00312600     
3126                    thereof are congruous.                               00312700     
3127                                                                         00312800     
3128                                                                         00312900     
3129                d)  They  are  both  functional-parameter-specifications,00313000     
3130                    the  formal-parameter-lists  of the function-headings00313100     
3131                    thereof are congruous, and  the  type-identifiers  of00313200     
3132                    the  result-types  of  the  function-headings thereof00313300     
3133                    denote the same type.                                00313400     
3134                                                                         00313500     
3135                                                                         00313600     
3136                e)  They                     are                     both00313700     
3137                    conformant-array-parameter-specifications  containing00313800     
3138                    the  same  number  of   parameters   and   equivalent00313900     
3139                    conformant-array-schemas.                         Two00314000     
3140                    conformant-array-schemas shall be equivalent  if  all00314100     
3141                    of the four statements which follow are true.        00314200     
3142                                                                         00314300     
3143                                                                         00314400     
3144                       1) There is a single index-type  specification  in00314500     
3145                          each conformant-array-schema.                  00314600     
3146                                                                         00314700     
3147                                                                         00314800     
3148                       2) The     ordinal-type-identifier     in     each00314900     
3149                          index-type-specification denotes the same type.00315000     
3150                                                                         00315100     
3151                                                                         00315200     
3152                       3) Either the (component) conformant-array-schemas00315300     
3153                          of  the conformant-array-schemas are equivalent00315400     
3154                          or     the     type-identifiers     of      the00315500     
3155                          conformant-array-schemas denote the same type. 00315600     
3156                                                                         00315700     
3157                                                                         00315800     
3158                       4) Either   both   conformant-array-schemas    are00315900     
3159                          packed-conformant-array-schemas   or  both  are00316000     
3160                          unpacked conformant-array-schemas.             00316100     
3161                                                                         00316200     
3162                                                                         00316300     
3163                    NOTES:                                               00316400     
3164                                                                         00316500     
3165                                                                         00316600     
3166                    1) The abbreviated  conformant-array-schema  and  its00316700     
3167                    corresponding full form are equivalent (see 6.6.3.7) 00316800     
3168                                                                         00316900     
3169                                                                         00317000     
3170                    2) The contents of (e) above do not apply to level 0.00317100     
3171                                                                         00317200     
3172                                                                         00317300     
3173                                                                         00317400     
3174            6.6.3.7 CONFORMANT ARRAY PARAMETERS                          00317500     
3175            -----------------------------------                          00317600     
3176                                                                         00317700     
3177                                                                         00317800     
3178            NOTE:  This clause does not apply to level 0.                00317900     
3179                                                                         00318000     
3180                                                                         00318100     
3181                                                                         00318200     
3182                               DP7185                             PAGE 5400318300     
3183                                                                         00318400     
3184                                                                         00318500     
3185                                                                         00318600     
3186            The occurrence of an identifier in the identifier-list  of  a00318700     
3187            conformant-array-parameter-specification shall constitute its00318800     
3188            defining-point as a parameter-identifier for the region  that00318900     
3189            is  the  formal-parameter-list  closest-containing it and its00319000     
3190            defining-point as the associated variable-identifier for  the00319100     
3191            region  that  is  the  block, if any, of which it is a formal00319200     
3192            parameter.                                                   00319300     
3193                                                                         00319400     
3194                                                                         00319500     
3195            The     occurrence     of     an     identifier     in     an00319600     
3196            index-type-specification  shall constitute its defining-point00319700     
3197            as  a  bound-identifier  for   the   region   that   is   the00319800     
3198            formal-parameter-list   closest-containing  it  and  for  the00319900     
3199            region that is the block, if any, whose formal parameters are00320000     
3200            specified by that formal-parameter-list.                     00320100     
3201                                                                         00320200     
3202                                                                         00320300     
3203               formal-parameter-section >                                00320400     
3204                  conformant-array-parameter-specification .             00320500     
3205               conformant-array-parameter-specification =                00320600     
3206                  "var" identifier-list ":" conformant-array-schema .    00320700     
3207               conformant-array-schema =                                 00320800     
3208                  (packed-conformant-array-schema |                      00320900     
3209                  unpacked-conformant-array-schema) .                    00321000     
3210               packed-conformant-array-schema =                          00321100     
3211                  "packed" "array" "[" index-type-specification "]"      00321200     
3212                  "of" type-identifier .                                 00321300     
3213               unpacked-conformant-array-schema                          00321400     
3214                  "array" "[" index-type-specification                   00321500     
3215                  { ";" index-type-specification } "]" "of"              00321600     
3216                  ( type-identifier | conformant-array-schema ) .        00321700     
3217               index-type-specification =                                00321800     
3218                  identifier ".." identifier                             00321900     
3219                  ":" ordinal-type-identifier .                          00322000     
3220               bound-identifier = identifier .                           00322100     
3221               factor > bound-identifier .                               00322200     
3222                                                                         00322300     
3223                                                                         00322400     
3224            NOTE:  There    is     also     a     syntax     rule     for00322500     
3225            formal-parameter-section  in 6.6.3.1.  There is also a syntax00322600     
3226            rule for factor in 6.7.1.                                    00322700     
3227                                                                         00322800     
3228                                                                         00322900     
3229            If      a      conformant-array-schema       contains       a00323000     
3230            conformant-array-schema,   then   an   abbreviated   form  of00323100     
3231            definition may be used.  In the abbreviated  form,  a  single00323200     
3232            semi-colon  shall  replace  the sequence "]" "of" "array" "["00323300     
3233            that occurs in the full form.  The abbreviated form  and  the00323400     
3234            full form shall be equivalent.                               00323500     
3235                                                                         00323600     
3236                                                                         00323700     
3237                                                                         00323800     
3238                                                                         00323900     
3239                                                                         00324000     
3240                                                                         00324100     
3241                                                                         00324200     
3242                               DP7185                             PAGE 5500324300     
3243                                                                         00324400     
3244                                                                         00324500     
3245                                                                         00324600     
3246            Examples:                                                    00324700     
3247                                                                         00324800     
3248                                                                         00324900     
3249               array[u..v: T1] of array[j..k: T2] of T3                  00325000     
3250               array[u..v: T1; j..k: T2] of T3                           00325100     
3251                                                                         00325200     
3252                                                                         00325300     
3253            During  the  entire  activation  of  the  block,  the   first00325400     
3254            bound-identifier  of an index-type-specification shall denote00325500     
3255            the smallest value specified by the corresponding  index-type00325600     
3256            (see  6.6.3.8)  possessed  by  each actual-parameter, and the00325700     
3257            second bound-identifier of the index-type-specification shall00325800     
3258            denote the largest value specified by that index-type.       00325900     
3259                                                                         00326000     
3260                                                                         00326100     
3261            The actual-parameters (see 6.7.3 and  6.8.2.3)  corresponding00326200     
3262            to    formal    parameters    that    occur   in   a   single00326300     
3263            conformant-array-parameter-specification  shall  all  possess00326400     
3264            the  same  type.  The type possessed by the actual-parameters00326500     
3265            shall    be    conformable    (see    6.6.3.8)    with    the00326600     
3266            conformant-array-schema,  and  the  formal  parameters  shall00326700     
3267            possess an array-type which shall be distinct from any  other00326800     
3268            type,  and  which  shall  have a component-type that shall be00326900     
3269            that  denoted  by  the  type-identifier  contained   by   the00327000     
3270            conformant-array-schema                 in                the00327100     
3271            conformant-array-parameter-specification and which shall have00327200     
3272            the    index-types    of    the   type   possessed   by   the00327300     
3273            actual-parameters  that  correspond  (see  6.6.3.8)  to   the00327400     
3274            index-type-specifications        contained       by       the00327500     
3275            conformant-array-schema                in                 the00327600     
3276            conformant-array-parameter-specification.                    00327700     
3277                                                                         00327800     
3278                                                                         00327900     
3279            NOTE:  The  type  of  the  formal  parameter  can  not  be  a00328000     
3280            string-type  (see  6.4.3.2)  because  it is not denoted by an00328100     
3281            array-type.                                                  00328200     
3282                                                                         00328300     
3283                                                                         00328400     
3284            The actual-parameter shall be either a variable-access or  an00328500     
3285            expression   that   is   not   a   factor   that   is  not  a00328600     
3286            variable-access.  If the actual-parameter is  an  expression,00328700     
3287            the  value  of  the  expression  shall  be  attributed before00328800     
3288            activation of the block to an auxiliary  variable  which  the00328900     
3289            program  does  not  otherwise contain.  The type possessed by00329000     
3290            this variable shall be the same  as  that  possessed  by  the00329100     
3291            expression.   This variable, or the actual-parameter if it is00329200     
3292            denoted by a variable-access, shall be  accessed  before  the00329300     
3293            activation  of  the  block, and this access shall establish a00329400     
3294            reference to the variable thereby accessed during the  entire00329500     
3295            activation  of the block;  the corresponding formal parameter00329600     
3296            and its associated variable-identifier  shall  represent  the00329700     
3297            referenced variable during the activation.                   00329800     
3298                                                                         00329900     
3299                                                                         00330000     
3300                                                                         00330100     
3301                                                                         00330200     
3302                               DP7185                             PAGE 5600330300     
3303                                                                         00330400     
3304                                                                         00330500     
3305                                                                         00330600     
3306            NOTE:  In using an array variable A as  an  actual  parameter00330700     
3307            corresponding   to  a  formal  parameter  that  occurs  in  a00330800     
3308            conformant-array-parameter-specification  the   use   of   an00330900     
3309            auxiliary    variable    is    ensured   by   enclosing   the00331000     
3310            variable-access A in parentheses.                            00331100     
3311                                                                         00331200     
3312                                                                         00331300     
3313            An actual-parameter  that  is  a  variable-access  shall  not00331400     
3314            denote  a  component of a variable that possesses a type that00331500     
3315            is designated packed.                                        00331600     
3316                                                                         00331700     
3317                                                                         00331800     
3318            If the actual-parameter  is  an  expression  whose  value  is00331900     
3319            denoted   by   a  variable-access  that  closest-contains  an00332000     
3320            identifier   which   has   a   defining-occurrence   in   the00332100     
3321            identifier-list                      of                      00332200     
3322            conformant-array-parameter-specification, then               00332300     
3323                                                                         00332400     
3324                                                                         00332500     
3325                a)  that   identifier   shall   be   contained   by    an00332600     
3326                    indexed-variable contained by the expression, and    00332700     
3327                                                                         00332800     
3328                                                                         00332900     
3329                b)  The factor  closest-containing  the  indexed-variable00333000     
3330                    shall    closest-contain    at    least    as    many00333100     
3331                    index-expressions               as                the00333200     
3332                    conformant-array-parameter-specification     contains00333300     
3333                    index-type-specifications.                           00333400     
3334                                                                         00333500     
3335                                                                         00333600     
3336            NOTE:  This ensures that the type of the expression  and  the00333700     
3337            anonymous  variable  will  always  be  known  and  that, as a00333800     
3338            consequence, the activation record of a procedure can be of a00333900     
3339            fixed size.                                                  00334000     
3340                                                                         00334100     
3341                                                                         00334200     
3342                                                                         00334300     
3343                                                                         00334400     
3344            6.6.3.8 CONFORMABILITY                                       00334500     
3345            ----------------------                                       00334600     
3346                                                                         00334700     
3347                                                                         00334800     
3348            NOTE:  This clause does not apply to level 0.                00334900     
3349                                                                         00335000     
3350                                                                         00335100     
3351            Given a type denoted by an  array-type  closest-containing  a00335200     
3352            single     index-type,    and    a    conformant-array-schema00335300     
3353            closest-containing a  single  index-type-specification,  then00335400     
3354            the  index-type  and  the  index-type-specification  shall be00335500     
3355            designated      as      corresponding.        Given       two00335600     
3356            conformant-array-schemas    closest-containing    a    single00335700     
3357            index-type-specification,        then         the         two00335800     
3358            index-type-specifications     shall    be    designated    as00335900     
3359                                                                         00336000     
3360                                                                         00336100     
3361                                                                         00336200     
3362                               DP7185                             PAGE 5700336300     
3363                                                                         00336400     
3364                                                                         00336500     
3365                                                                         00336600     
3366            corresponding.   Let  T1  be  an  array-type  with  a  single00336700     
3367            indextype   and   let  T2  be  the  type   denoted   by   the00336800     
3368            ordinal-type-identifier of the index-type-specification of  a00336900     
3369            conformant-array-schema    closest-containing    a     single00337000     
3370            index-type-specification, then T1 shall be  conformable  with00337100     
3371            the   conformant-array-schema  if  all  the  following   four00337200     
3372            statements are true.                                         00337300     
3373                                                                         00337400     
3374                                                                         00337500     
3375               a)  The index-type of T1 is compatible with T2.           00337600     
3376                                                                         00337700     
3377                                                                         00337800     
3378               b)  The smallest  and  largest  values  specified  by  the00337900     
3379                   index-type  of  T1  lie  within  the  closed  interval00338000     
3380                   specified by T2.                                      00338100     
3381                                                                         00338200     
3382                                                                         00338300     
3383               c)  The component-type of T1 denotes the same type as that00338400     
3384                   which  is  denoted  by  the  type-identifier  of   the00338500     
3385                   conformant-array-schema,  or  is  conformable  to  the00338600     
3386                   conformant-array-schema             in             the00338700     
3387                   conformant-array-schema.                              00338800     
3388                                                                         00338900     
3389                                                                         00339000     
3390               d)  Either  T1   is   not   designated   packed   and  the00339100     
3391                   conformant-array-schema             is              an00339200     
3392                   unpacked-conformant-array-schema, or T1 is  designated00339300     
3393                   packed   and   the   conformant-array-schema   is    a00339400     
3394                   packed-conformant-array-schema.                       00339500     
3395                                                                         00339600     
3396                                                                         00339700     
3397               NOTE: The   abbreviated    and    full    forms    of    a00339800     
3398               conformant-array-schema are equivalent (see 6.6.3.7).  The00339900     
3399               abbreviated and full forms of an array-type are equivalent00340000     
3400               (see 6.4.3.2).                                            00340100     
3401                                                                         00340200     
3402                                                                         00340300     
3403            It shall be  an  error  if  the  smallest  or  largest  value00340400     
3404            specified  by  the  index-type  of T1 lies outside the closed00340500     
3405            interval specified by T2.                                    00340600     
3406                                                                         00340700     
3407                                                                         00340800     
3408                                                                         00340900     
3409                                                                         00341000     
3410                                                                         00341100     
3411                                                                         00341200     
3412                                                                         00341300     
3413                                                                         00341400     
3414                                                                         00341500     
3415                                                                         00341600     
3416                                                                         00341700     
3417                                                                         00341800     
3418                                                                         00341900     
3419                                                                         00342000     
3420                                                                         00342100     
3421                                                                         00342200     
3422                               DP7185                             PAGE 5800342300     
3423                                                                         00342400     
3424                                                                         00342500     
3425                                                                         00342600     
3426         6.6.4 REQUIRED PROCEDURES AND FUNCTIONS                         00342700     
3427         ---------------------------------------                         00342800     
3428                                                                         00342900     
3429                                                                         00343000     
3430            6.6.4.1 GENERAL                                              00343100     
3431            ---------------                                              00343200     
3432                                                                         00343300     
3433                                                                         00343400     
3434            Required procedures and functions shall be predeclared.   The00343500     
3435            required  procedures  and  functions shall be as specified in00343600     
3436            6.6.5 and 6.6.6 respectively.                                00343700     
3437                                                                         00343800     
3438                                                                         00343900     
3439            NOTE:  Required procedures and functions do  not  necessarily00344000     
3440            follow   the   rules   given  elsewhere  for  procedures  and00344100     
3441            functions.                                                   00344200     
3442                                                                         00344300     
3443                                                                         00344400     
3444                                                                         00344500     
3445                                                                         00344600     
3446         6.6.5 REQUIRED PROCEDURES                                       00344700     
3447         -------------------------                                       00344800     
3448                                                                         00344900     
3449                                                                         00345000     
3450            6.6.5.1 GENERAL                                              00345100     
3451            ---------------                                              00345200     
3452                                                                         00345300     
3453                                                                         00345400     
3454            The required procedures shall be  file  handling  procedures,00345500     
3455            dynamic allocation procedures and transfer procedures.       00345600     
3456                                                                         00345700     
3457                                                                         00345800     
3458                                                                         00345900     
3459                                                                         00346000     
3460            6.6.5.2 FILE HANDLING PROCEDURES                             00346100     
3461            --------------------------------                             00346200     
3462                                                                         00346300     
3463                                                                         00346400     
3464            Except for the application of rewrite or reset to the program00346500     
3465            parameters  denoted  by  input  or  output,  the  effects  of00346600     
3466            applying each of the file handling procedures  rewrite,  put,00346700     
3467            reset  and  get  to  a  file-variable  f  shall be defined by00346800     
3468            pre-assertions and post-assertions about  f,  its  components00346900     
3469            f,L,  f.R,  and f.M, and about the associated buffer-variable00347000     
3470            f^.  The use of the variable f0 within an assertion shall  be00347100     
3471            considered  to  represent the state or value, as appropriate,00347200     
3472            of f prior to the operation, and similarly for  f0^  and  f^,00347300     
3473            while f (within an assertion) shall denote the variable after00347400     
3474            the operation.                                               00347500     
3475                                                                         00347600     
3476                                                                         00347700     
3477            It  shall  be an error if the stated pre-assertion  does  not00347800     
3478            hold  immediately prior to any use of the defined  operation.00347900     
3479                                                                         00348000     
3480                                                                         00348100     
3481                                                                         00348200     
3482                               DP7185                             PAGE 5900348300     
3483                                                                         00348400     
3484                                                                         00348500     
3485                                                                         00348600     
3486            It shall be an error if any variable explicitly denoted in an00348700     
3487            assertion of equality is undefined. The post-assertion  shall00348800     
3488            hold  prior  to the next subsequent access to the  file,  its00348900     
3489            components,   or   its   associated   buffer-variable.    The00349000     
3490            post-assertions  imply   corresponding   activities   on  the00349100     
3491            external entities, if any, to which  the  file-variables  are00349200     
3492            bound.  These activities,  and the  point at  which they  are00349300     
3493            actually performed, shall be implementation-defined.         00349400     
3494                                                                         00349500     
3495                                                                         00349600     
3496            rewrite(f)  pre-assertion:   true.                           00349700     
3497                        post-assertion:  (f.L = f.R = S()) and           00349800     
3498                                         (f.M = Generation) and          00349900     
3499                                         (f^ is totally-undefined).      00350000     
3500                                                                         00350100     
3501                                                                         00350200     
3502            put(f)      pre-assertion:   (f0.M = Generation) and         00350300     
3503                                         (f0.L is not undefined) and     00350400     
3504                                         (f0.R = S()) and                00350500     
3505                                         (f0^ is not undefined).         00350600     
3506                        post-assertion:  (f.M = Generation) and          00350700     
3507                                         (f.L = (f0.L~S(f0^))) and       00350800     
3508                                         (f.R = S()) and                 00350900     
3509                                         (f^ is totally-undefined).      00351000     
3510                                                                         00351100     
3511            reset(f)    pre-assertion:   The components f0.L and f0.R    00351200     
3512                                         are not undefined.              00351300     
3513                        post-assertion:  (f.L = S()) and                 00351400     
3514                                         (f.R = (f0.L~f0.R~X)) and       00351500     
3515                                         (f.M = Inspection) and          00351600     
3516                                         (if f.R = S() then (f^ is       00351700     
3517                                         totally-undefined)              00351800     
3518                                         else (f^ = f.R.first)),         00351900     
3519                                                                         00352000     
3520                                         where, if f is of the type      00352100     
3521                                         denoted by the required         00352200     
3522                                         structured-type-identifier      00352300     
3523                                         text and if f0.L~f0.R is        00352400     
3524                                         not empty and if                00352500     
3525                                         (f0.L~f0.R).last is not         00352600     
3526                                         designated an end-of-line,      00352700     
3527                                         then X shall be a sequence      00352800     
3528                                         having an end-of-line component 00352900     
3529                                         as its only component;          00353000     
3530                                         otherwise x = s().              00353100     
3531                                                                         00353200     
3532            set(f)      pre-assertion:   (f0.M = Inspection) and         00353300     
3533                                         (neither f0.L nor f0.R          00353400     
3534                                         are undefined)                  00353500     
3535                                         and (f0.R <> S()).              00353600     
3536                        post-assertion:  (f.M = Inspection) and          00353700     
3537                                         (f.L = (f0.L~S(f0.R.first))) and00353800     
3538                                         (f.R = f0.R.rest) and           00353900     
3539                                         (if f.R = S() then (f^ is       00354000     
3540                                                                         00354100     
3541                                                                         00354200     
3542                               DP7185                             PAGE 6000354300     
3543                                                                         00354400     
3544                                                                         00354500     
3545                                                                         00354600     
3546                                         totally-undefined)              00354700     
3547                                         else (f^ = f.R.first)).         00354800     
3548                                                                         00354900     
3549                                                                         00355000     
3550            When the file-variable f possesses a  type  other  than  that00355100     
3551            denoted by text, the required procedures read and write shall00355200     
3552            be defined as follows.                                       00355300     
3553                                                                         00355400     
3554                                                                         00355500     
3555            read  Read(f,v1,...,vn)      where       v1...vn       denote00355600     
3556                  variable-accesses shall be equivalent to               00355700     
3557                                                                         00355800     
3558                                                                         00355900     
3559                          begin read(f,v1); ... ; read(f,vn) end         00356000     
3560                                                                         00356100     
3561                                                                         00356200     
3562                  Read(f,v) where v denotes a  variable-access  shall  be00356300     
3563                  equivalent to                                          00356400     
3564                                                                         00356500     
3565                                                                         00356600     
3566                                 begin v := f^; get(f) end               00356700     
3567                                                                         00356800     
3568                                                                         00356900     
3569            NOTE:  The  variable-access  is  not  a  variable  parameter.00357000     
3570            Consequently  it may be a component of a packed structure and00357100     
3571            the   value   of   the   buffer-variable   need    only    be00357200     
3572            assignment-compatible with it.                               00357300     
3573                                                                         00357400     
3574                                                                         00357500     
3575            Write(f,e1,...,en), where e1...en denote expressions shall be00357600     
3576            equivalent to                                                00357700     
3577                                                                         00357800     
3578                                                                         00357900     
3579                      begin write(f,e1); ... ; write(f,en) end           00358000     
3580                                                                         00358100     
3581                                                                         00358200     
3582            NOTES: 1.  The   required  procedures  read,  write,  readln,00358300     
3583                       writeln, and page, as applied  to  textfiles,  are00358400     
3584                       described in 6.9.                                 00358500     
3585                                                                         00358600     
3586                   2.  Since the definitions of read  and  write  include00358700     
3587                       the use of get and put, the implementation-defined00358800     
3588                       aspects of their post-assertions also apply.      00358900     
3589                                                                         00359000     
3590                                                                         00359100     
3591                                                                         00359200     
3592                                                                         00359300     
3593            6.6.5.3 DYNAMIC ALLOCATION PROCEDURES                        00359400     
3594            -------------------------------------                        00359500     
3595                                                                         00359600     
3596                                                                         00359700     
3597            new(p)      shall    create   a   new   variable   that    is00359800     
3598                        totally-undefined,    shall    create    a    new00359900     
3599                        identifying-value of the pointer-type  associated00360000     
3600                        with  p,  that identifies the new  variable,  and00360100     
3601                                                                         00360200     
3602                               DP7185                             PAGE 6100360300     
3603                                                                         00360400     
3604                                                                         00360500     
3605                                                                         00360600     
3606                        shall  attribute  this identifying-value  to  the00360700     
3607                        variable  denoted  by the variable-access p.  The00360800     
3608                        created variable shall possess the type  that  is00360900     
3609                        the  domain-type of the pointer-type possessed by00361000     
3610                        p.                                               00361100     
3611                                                                         00361200     
3612                                                                         00361300     
3613            new(p,c1,...,cn)shall  create  a   new   variable   that   is00361400     
3614                        totally-undefined,    shall    create    a    new00361500     
3615                        identifying-value of the pointer-type  associated00361600     
3616                        with  p,  that  identifies  the new variable, and00361700     
3617                        shall attribute  this  identifying-value  to  the00361800     
3618                        variable  denoted  by the variable-access p.  The00361900     
3619                        created variable shall  possess  the  record-type00362000     
3620                        that  is  the  domain-type  of  the  pointer-type00362100     
3621                        possessed by p and  shall  have  nested  variants00362200     
3622                        that  correspond to the case-constants c1,...,cn.00362300     
3623                        The case-constants shall be listed  in  order  of00362400     
3624                        increasing  nesting  of  the  variant-parts.  Any00362500     
3625                        variant not specified shall be at a deeper  level00362600     
3626                        of  nesting  than that specified by cn.  It shall00362700     
3627                        be an error if a variant of a variant-part within00362800     
3628                        the  new  variable becomes active and a different00362900     
3629                        variant  of  the  variant-part  is  one  of   the00363000     
3630                        specified variants.                              00363100     
3631                                                                         00363200     
3632                                                                         00363300     
3633            dispose(q)  shall remove the identifying-value denoted by the00363400     
3634                        expression  q  from  the  pointer-type  of q.  It00363500     
3635                        shall be an error if  the  identifying-value  has00363600     
3636                        been created using the form new(p,c1,...,cn).    00363700     
3637                                                                         00363800     
3638                                                                         00363900     
3639            dispose(q,k1,...,km)shall   remove   the    identifying-value00364000     
3640                        denoted by the expression q from the pointer-type00364100     
3641                        of q.   The  case-constants  k1,...,km  shall  be00364200     
3642                        listed  in  order  of  increasing  nesting of the00364300     
3643                        variant-parts.  It  shall  be  an  error  if  the00364400     
3644                        variable   had   been   created  using  the  form00364500     
3645                        new(p,c1,...,cn), and m is less than n.  It shall00364600     
3646                        be  an  error  if  the  variants  in the variable00364700     
3647                        identified by q^ are  not  different  from  those00364800     
3648                        specified by the case-constants k1,...,km.       00364900     
3649                                                                         00365000     
3650                                                                         00365100     
3651                                                                         00365200     
3652                                                                         00365300     
3653                                                                         00365400     
3654                                                                         00365500     
3655                                                                         00365600     
3656                                                                         00365700     
3657                                                                         00365800     
3658                                                                         00365900     
3659                                                                         00366000     
3660                                                                         00366100     
3661                                                                         00366200     
3662                               DP7185                             PAGE 6200366300     
3663                                                                         00366400     
3664                                                                         00366500     
3665                                                                         00366600     
3666            NOTE:  The  removal  of   an   identifying-value   from   the00366700     
3667            pointer-type  to  which  it  belongs  renders  the identifier00366800     
3668            variable inaccessible (see 6.5.4)  and  makes  undefined  all00366900     
3669            variables  and functions that have that value attributed (see00367000     
3670            6.8.2.2).                                                    00367100     
3671                                                                         00367200     
3672                                                                         00367300     
3673            It shall be an error if q has a nil-value or is undefined.   00367400     
3674                                                                         00367500     
3675                                                                         00367600     
3676            It shall be an error if a variable created using  the  second00367700     
3677            form  of  new  is  accessed by the identified-variable of the00367800     
3678            variable-access of a factor, of an  assignment-statement,  or00367900     
3679            of an actual-parameter.                                      00368000     
3680                                                                         00368100     
3681                                                                         00368200     
3682                                                                         00368300     
3683                                                                         00368400     
3684            6.6.5.4 TRANSFER PROCEDURES                                  00368500     
3685            ---------------------------                                  00368600     
3686                                                                         00368700     
3687                                                                         00368800     
3688            Let a be a variable possessing a type that can be denoted by 00368900     
3689                                                                         00369000     
3690                                                                         00369100     
3691                                   array [s1] of T                       00369200     
3692                                                                         00369300     
3693                                                                         00369400     
3694            let z be a variable possessing a type that can be denoted by 00369500     
3695                                                                         00369600     
3696                                                                         00369700     
3697                               packed array [s2] of T                    00369800     
3698                                                                         00369900     
3699                                                                         00370000     
3700            and u and v be the smallest and largest values  of  the  type00370100     
3701            s2, then the statement pack(a,i,z) shall be equivalent to    00370200     
3702                                                                         00370300     
3703                                                                         00370400     
3704              begin                                                      00370500     
3705              k := i;                                                    00370600     
3706              for j := u to v do                                         00370700     
3707                begin                                                    00370800     
3708                z[j] := a[k];                                            00370900     
3709                if j <> v then k := succ(k)                              00371000     
3710                end                                                      00371100     
3711              end                                                        00371200     
3712                                                                         00371300     
3713            and the statement unpack(z,a,i) shall be equivalent to       00371400     
3714                                                                         00371500     
3715              begin                                                      00371600     
3716              k := i;                                                    00371700     
3717              for j := u to v do                                         00371800     
3718                begin                                                    00371900     
3719                                                                         00372000     
3720                                                                         00372100     
3721                                                                         00372200     
3722                               DP7185                             PAGE 6300372300     
3723                                                                         00372400     
3724                                                                         00372500     
3725                                                                         00372600     
3726                a[k] := z[j];                                            00372700     
3727                if j <> v then k := succ(k)                              00372800     
3728                end                                                      00372900     
3729              end                                                        00373000     
3730                                                                         00373100     
3731                                                                         00373200     
3732            where j and k denote auxiliary variables  which  the  program00373300     
3733            does not otherwise contain.  The type possessed by j shall be00373400     
3734            s2, the type possessed by k shall be s1, and i  shall  be  an00373500     
3735            expression  whose  value  shall be assignment-compatible with00373600     
3736            s1.                                                          00373700     
3737                                                                         00373800     
3738                                                                         00373900     
3739                                                                         00374000     
3740                                                                         00374100     
3741         6.6.6 REQUIRED FUNCTIONS                                        00374200     
3742         ------------------------                                        00374300     
3743                                                                         00374400     
3744                                                                         00374500     
3745            6.6.6.1 GENERAL                                              00374600     
3746            ---------------                                              00374700     
3747                                                                         00374800     
3748                                                                         00374900     
3749            The  required  functions  shall  be   arithmetic   functions,00375000     
3750            transfer functions, ordinal functions and Boolean functions. 00375100     
3751                                                                         00375200     
3752                                                                         00375300     
3753                                                                         00375400     
3754                                                                         00375500     
3755            6.6.6.2 ARITHMETIC FUNCTIONS                                 00375600     
3756            ----------------------------                                 00375700     
3757                                                                         00375800     
3758                                                                         00375900     
3759            For the following  arithmetic  functions,  the  expression  x00376000     
3760            shall  be  either  of  real-type  or  integer-type.   For the00376100     
3761            functions abs and sqr, the type of the result  shall  be  the00376200     
3762            same  as  the  type  of  the parameter, x.  For the remaining00376300     
3763            arithmetic  functions,  the  result  shall   always   be   of00376400     
3764            real-type.                                                   00376500     
3765                                                                         00376600     
3766                                                                         00376700     
3767            abs(x)     shall compute the absolute value of x.            00376800     
3768                                                                         00376900     
3769                                                                         00377000     
3770            sqr(x)     shall compute the square of x.   It  shall  be  an00377100     
3771                       error if such a value does not exist.             00377200     
3772                                                                         00377300     
3773                                                                         00377400     
3774            sin(x)     shall compute  the  sine  of  x,  where  x  is  in00377500     
3775                       radians.                                          00377600     
3776                                                                         00377700     
3777                                                                         00377800     
3778            cos(x)     shall compute the cosine  of  x,  where  x  is  in00377900     
3779                                                                         00378000     
3780                                                                         00378100     
3781                                                                         00378200     
3782                               DP7185                             PAGE 6400378300     
3783                                                                         00378400     
3784                                                                         00378500     
3785                                                                         00378600     
3786                       radians.                                          00378700     
3787                                                                         00378800     
3788                                                                         00378900     
3789            exp(x)     shall compute the value of  the  base  of  natural00379000     
3790                       logarithms raised to the power x.                 00379100     
3791                                                                         00379200     
3792                                                                         00379300     
3793            ln(x)      shall compute the natural logarithm of x, if x  is00379400     
3794                       greater  than  zero.  It shall be an error if x is00379500     
3795                       not greater than zero.                            00379600     
3796                                                                         00379700     
3797                                                                         00379800     
3798            sqrt(x)    shall compute the non-negative square root  of  x,00379900     
3799                       if  x  is not negative.  It shall be an error if x00380000     
3800                       is negative.                                      00380100     
3801                                                                         00380200     
3802                                                                         00380300     
3803            arctan(x)  shall compute the principal value, in radians,  of00380400     
3804                       the arctangent of x.                              00380500     
3805                                                                         00380600     
3806                                                                         00380700     
3807                                                                         00380800     
3808                                                                         00380900     
3809            6.6.6.3 TRANSFER FUNCTIONS                                   00381000     
3810            --------------------------                                   00381100     
3811                                                                         00381200     
3812                                                                         00381300     
3813            trunc(x)  From the expression x that shall be  of  real-type,00381400     
3814                      this    function   shall   return   a   result   of00381500     
3815                      integer-type.  The value of trunc(x) shall be  such00381600     
3816                      that if x is positive or zero then 0<=x-trunc(x)<1;00381700     
3817                      otherwise -1<x-trunc(x)<=0.  It shall be  an  error00381800     
3818                      if such a value does not exist.                    00381900     
3819                                                                         00382000     
3820                                                                         00382100     
3821                      Examples:                                          00382200     
3822                                                                         00382300     
3823                                                                         00382400     
3824                           trunc(3.5) yields 3                           00382500     
3825                           trunc(-3.5) yields -3                         00382600     
3826                                                                         00382700     
3827                                                                         00382800     
3828            round(x)  From the expression x that shall be  of  real-type,00382900     
3829                      this    function   shall   return   a   result   of00383000     
3830                      integer-type.  If x is positive or  zero,  round(x)00383100     
3831                      shall  be  equivalent  to  trunc(x+0.5),  otherwise00383200     
3832                      round(x) shall be equivalent to  trunc(x-0.5).   It00383300     
3833                      shall be an error if such a value does not exist.  00383400     
3834                                                                         00383500     
3835                                                                         00383600     
3836                      Examples:                                          00383700     
3837                                                                         00383800     
3838                                                                         00383900     
3839                                                                         00384000     
3840                                                                         00384100     
3841                                                                         00384200     
3842                               DP7185                             PAGE 6500384300     
3843                                                                         00384400     
3844                                                                         00384500     
3845                                                                         00384600     
3846                           round(3.5) yields 4                           00384700     
3847                           round(-3.5) yields -4                         00384800     
3848                                                                         00384900     
3849                                                                         00385000     
3850                                                                         00385100     
3851            6.6.6.4 ORDINAL FUNCTIONS                                    00385200     
3852            -------------------------                                    00385300     
3853                                                                         00385400     
3854                                                                         00385500     
3855            ord(x)   From  the  expression  x  that  shall   be   of   an00385600     
3856                     ordinal-type, this function shall return a result of00385700     
3857                     integer-type that shall be the ordinal  number  (see00385800     
3858                     6.4.2.2  and 6.4.2.3) of the value of the expression00385900     
3859                     x.                                                  00386000     
3860                                                                         00386100     
3861                                                                         00386200     
3862            chr(x)   From the expression x that shall be of integer-type,00386300     
3863                     this  function  shall  return  a result of char-type00386400     
3864                     which shall be the value  whose  ordinal  number  is00386500     
3865                     equal  to  the  value  of the expression x if such a00386600     
3866                     character value exists.  It shall  be  an  error  if00386700     
3867                     such a character value does not exist.              00386800     
3868                                                                         00386900     
3869                                                                         00387000     
3870                     For any value, ch, of char-type, the following shall00387100     
3871                     be true:                                            00387200     
3872                                                                         00387300     
3873                                                                         00387400     
3874                                      chr(ord(ch)) = ch                  00387500     
3875                                                                         00387600     
3876                                                                         00387700     
3877            succ(x)  From  the  expression  x  that  shall   be   of   an00387800     
3878                     ordinal-type,  this  function  shall return a result00387900     
3879                     that shall be of  the  same  type  as  that  of  the00388000     
3880                     expression  (see 6.7.1).  The function shall yield a00388100     
3881                     value whose ordinal number is one greater than  that00388200     
3882                     of  the  expression  x,  if such a value exists.  It00388300     
3883                     shall be an error if such a value does not exist.   00388400     
3884                                                                         00388500     
3885                                                                         00388600     
3886            pred(x)  From  the  expression  x  that  shall   be   of   an00388700     
3887                     ordinal-type,  this  function  shall return a result00388800     
3888                     that shall be of  the  same  type  as  that  of  the00388900     
3889                     expression  (see 6.7.1).  The function shall yield a00389000     
3890                     value whose ordinal number is one less than that  of00389100     
3891                     the  expression x, if such a value exists.  It shall00389200     
3892                     be an error if such a value does not exist.         00389300     
3893                                                                         00389400     
3894                                                                         00389500     
3895                                                                         00389600     
3896                                                                         00389700     
3897            6.6.6.5 BOOLEAN FUNCTIONS                                    00389800     
3898            -------------------------                                    00389900     
3899                                                                         00390000     
3900                                                                         00390100     
3901                                                                         00390200     
3902                               DP7185                             PAGE 6600390300     
3903                                                                         00390400     
3904                                                                         00390500     
3905                                                                         00390600     
3906            odd(x)   From the expression x that shall be of integer-type,00390700     
3907                     this  function shall be equivalent to the expression00390800     
3908                     (abs(x) mod 2 = 1).                                 00390900     
3909                                                                         00391000     
3910                                                                         00391100     
3911            eof(f)   The parameter f shall be a  file-variable;   if  the00391200     
3912                     actual-parameter-list is omitted, the function shall00391300     
3913                     be applied  to  the  required  textfile  input  (see00391400     
3914                     6.10).   When  eof(f)  is  activated, it shall be an00391500     
3915                     error if f is  undefined;   otherwise  the  function00391600     
3916                     shall  yield  the  value  true  if  f.R is the empty00391700     
3917                     sequence (see 6.4.3.5), otherwise false.            00391800     
3918                                                                         00391900     
3919                                                                         00392000     
3920                     eoln(f)  The parameter f shall be  a  textfile;   if00392100     
3921                     the  actual-parameter-list  is omitted, the function00392200     
3922                     shall be applied to the required textfile input (see00392300     
3923                     6.10).   When  eoln(f)  is activated, it shall be an00392400     
3924                     error if f  is  undefined  or  if  eof(f)  is  true;00392500     
3925                     otherwise the function shall yield the value true if00392600     
3926                     f.R.first is an end-of-line component (see 6.4.3.5),00392700     
3927                     otherwise false.                                    00392800     
3928                                                                         00392900     
3929                                                                         00393000     
3930                                                                         00393100     
3931                                                                         00393200     
3932      6.7 EXPRESSIONS                                                    00393300     
3933      ---------------                                                    00393400     
3934                                                                         00393500     
3935                                                                         00393600     
3936         6.7.1 GENERAL                                                   00393700     
3937         -------------                                                   00393800     
3938                                                                         00393900     
3939                                                                         00394000     
3940         An expression shall denote a value unless a variable denoted  by00394100     
3941         a  variable-access  contained  by the expression is undefined at00394200     
3942         the time of its use, in which case that use shall be  an  error.00394300     
3943         The use of a variable-access as a factor shall denote the value,00394400     
3944         if any, attributed to the variable accessed  thereby.   Operator00394500     
3945         precedences  shall  be according to four classes of operators as00394600     
3946         follows.  The operator not shall have  the  highest  precedence,00394700     
3947         followed by the multiplying-operators, then the adding-operators00394800     
3948         and  signs,  and  finally,  with  the  lowest  precedence,   the00394900     
3949         relational-operators.  Sequences of two or more operators of the00395000     
3950         same precedence shall be left associative.                      00395100     
3951                                                                         00395200     
3952                                                                         00395300     
3953            unsigned-constant = unsigned-number | character-string |     00395400     
3954                                  constant-identifier | "nil" .          00395500     
3955            factor > variable-access | unsigned-constant |               00395600     
3956                     function-designator | set-constructor |             00395700     
3957                     "(" expression ")" | "not" factor .                 00395800     
3958                                                                         00395900     
3959                                                                         00396000     
3960                                                                         00396100     
3961                                                                         00396200     
3962                               DP7185                             PAGE 6700396300     
3963                                                                         00396400     
3964                                                                         00396500     
3965                                                                         00396600     
3966         NOTE:  There is also a syntax rule for factor in 6.6.3.7.       00396700     
3967                                                                         00396800     
3968                                                                         00396900     
3969            set-constructor = "[" [ member-designator                    00397000     
3970                     { "," member-designator } ] "]" .                   00397100     
3971            member-designator = expression [ ".." expression ] .         00397200     
3972            term = factor { multiplying-operator factor } .              00397300     
3973            simple-expression = [ sign ] term { adding-operator term } . 00397400     
3974            expression =                                                 00397500     
3975               simple-expression                                         00397600     
3976               [ relational-operator simple-expression ] .               00397700     
3977                                                                         00397800     
3978                                                                         00397900     
3979         Any factor whose type is S, where S is a subrange of T, shall be00398000     
3980         treated  as  of type T.  Similarly, any factor whose type is set00398100     
3981         of S shall be treated as  of  the  unpacked  canonical  set-of-T00398200     
3982         type,  and  any  factor  whose  type is packed set of S shall be00398300     
3983         treated as of the canonical packed set-of-T type.               00398400     
3984                                                                         00398500     
3985                                                                         00398600     
3986         NOTE:  Consequently an expression  that  consists  of  a  single00398700     
3987         factor  of  type  S shall itself be of type T, and an expression00398800     
3988         that consists of a single factor of type set of S  shall  itself00398900     
3989         be of type set of T, and an expression that consists of a single00399000     
3990         factor of type packed set of S shall itself be  of  type  packed00399100     
3991         set of T.                                                       00399200     
3992                                                                         00399300     
3993                                                                         00399400     
3994         A set-constructor shall denote  a  value  of  a  set-type.   The00399500     
3995         set-constructor  []  shall  denote  that value in every set-type00399600     
3996         that contains no members.  A set-constructor containing  one  or00399700     
3997         more  member-designators  shall  denote  either  a  value of the00399800     
3998         unpacked canonical set-of-T type or, if the context so requires,00399900     
3999         the packed canonical set-of-T type, where T is the type of every00400000     
4000         expression of each  member-designator  of  the  set-constructor.00400100     
4001         The  type  T shall be an ordinal-type.  The value denoted by the00400200     
4002         set-constructor shall contain zero or more members each of which00400300     
4003         shall  be  denoted  by  at  least  one  member-designator of the00400400     
4004         set-constructor.                                                00400500     
4005                                                                         00400600     
4006                                                                         00400700     
4007         The member-designator x, where x is an expression, shall  denote00400800     
4008         the  member  that shall have the value x.  The member-designator00400900     
4009         x..y, where x and y are expressions, shall denote zero  or  more00401000     
4010         members  that  shall  have  the  values  of the base-type in the00401100     
4011         closed interval from the value of x to the value of y.          00401200     
4012                                                                         00401300     
4013                                                                         00401400     
4014         NOTE:  The member-designator x..y  denotes  no  members  if  the00401500     
4015         value of x is greater than the value of y.                      00401600     
4016                                                                         00401700     
4017                                                                         00401800     
4018         Examples are as follows:                                        00401900     
4019                                                                         00402000     
4020                                                                         00402100     
4021                                                                         00402200     
4022                               DP7185                             PAGE 6800402300     
4023                                                                         00402400     
4024                                                                         00402500     
4025                                                                         00402600     
4026            a) Factors:            x                                     00402700     
4027                                   15                                    00402800     
4028                                   (x+y+z)                               00402900     
4029                                   sin(x+y)                              00403000     
4030                                   [red,c,green]                         00403100     
4031                                   [1,5,10..19,23]                       00403200     
4032                                   not p                                 00403300     
4033                                                                         00403400     
4034            b) Terms:              x*y                                   00403500     
4035                                   i/(1-i)                               00403600     
4036                                   (x <= y) and (y < z)                  00403700     
4037                                                                         00403800     
4038            c) Simple expressions: p or q                                00403900     
4039                                   x+y                                   00404000     
4040                                   -x                                    00404100     
4041                                   hue1 + hue2                           00404200     
4042                                   i*j + 1                               00404300     
4043                                                                         00404400     
4044            d) Expressions:        x = 1.5                               00404500     
4045                                   p <= q                                00404600     
4046                                   p = q and r                           00404700     
4047                                   (i < j) = (j < k)                     00404800     
4048                                   c in hue1                             00404900     
4049                                                                         00405000     
4050                                                                         00405100     
4051         6.7.2 OPERAATORS                                               00405200     
4052         ---------------                                                 00405300     
4053                                                                         00405400     
4054                                                                         00405500     
4055            6.7.2.1 GENERAL                                              00405600     
4056            ---------------                                              00405700     
4057                                                                         00405800     
4058                                                                         00405900     
4059               multiplying-operator = "*" | "/" | "div" | "mod" | "and" .00406000     
4060                                                                         00406100     
4061               adding-operator = "+" | "-" | "or" .                      00406200     
4062                                                                         00406300     
4063               relational-operator =                                     00406400     
4064                  "=" | "<>" | "<" | ">" | "<=" | ">=" | "in" .          00406500     
4065                                                                         00406600     
4066                                                                         00406700     
4067            A  factor,  or  a  term,  or  a  simple-expression  shall  be00406800     
4068            designated  an  operand.   The  order  of  evaluation  of the00406900     
4069            operands    of     a     dyadic     operator     shall     be00407000     
4070            implementation-dependent.                                    00407100     
4071                                                                         00407200     
4072                                                                         00407300     
4073            NOTE:  This means, for example,  that  the  operands  may  be00407400     
4074            evaluated  in  textual  order,  or  in  reverse  order, or in00407500     
4075            parallel or they may not both be evaluated.                  00407600     
4076                                                                         00407700     
4077                                                                         00407800     
4078                                                                         00407900     
4079                                                                         00408000     
4080                                                                         00408100     
4081                                                                         00408200     
4082                               DP7185                             PAGE 6900408300     
4083                                                                         00408400     
4084                                                                         00408500     
4085                                                                         00408600     
4086            6.7.2.2 ARITHMETIC OPERATORS                                 00408700     
4087            ----------------------------                                 00408800     
4088                                                                         00408900     
4089                                                                         00409000     
4090            The types of operands and  results  for  dyadic  and  monadic00409100     
4091            operations shall be as shown in tables 2 and 3 respectively. 00409200     
4092                                                                         00409300     
4093                                                                         00409400     
4094                        Table 2. Dyadic Arithmetic Operations            00409500     
4095                        -------------------------------------            00409600     
4096                                                                         00409700     
4097                                                                         00409800     
4098            operator   operation       type of operands   type of result 00409900     
4099            --------   ---------       ----------------   -------------- 00410000     
4100                                                                         00410100     
4101               +       addition        integer-type       )integer-type  00410200     
4102                                       or real-type       )if both       00410300     
4103                                                                         00410400     
4104               -       subtraction     integer-type       )operands are  00410500     
4105                                       or real-type       )of integer-   00410600     
4106                                                          type           00410700     
4107                                                                         00410800     
4108               *       multiplication  integer-type       )otherwise     00410900     
4109                                       or real-type       )real-type     00411000     
4110                                                                         00411100     
4111               /       division        integer-type       real-type      00411200     
4112                                       or real-type                      00411300     
4113                                                                         00411400     
4114              div      division with   integer-type       integer-type   00411500     
4115                       truncation                                        00411600     
4116                                                                         00411700     
4117              mod      modulo          integer-type       integer-type   00411800     
4118                                                                         00411900     
4119                                                                         00412000     
4120                                                                         00412100     
4121                       Table 3. Monadic Arithmetic Operations            00412200     
4122                       --------------------------------------            00412300     
4123                                                                         00412400     
4124                                                                         00412500     
4125            operator   operation       type of operand   type of result  00412600     
4126            --------   ---------       ---------------   --------------  00412700     
4127                                                                         00412800     
4128               +       identity        integer-type      integer-type    00412900     
4129                                       real-type         real-type       00413000     
4130                                                                         00413100     
4131               -       sign-inversion  integer-type      integer-type    00413200     
4132                                       real-type         real-type       00413300     
4133                                                                         00413400     
4134                                                                         00413500     
4135                                                                         00413600     
4136            NOTE:  The symbols +, - and * are also used as set  operators00413700     
4137            (see 6.7.2.4).                                               00413800     
4138                                                                         00413900     
4139                                                                         00414000     
4140                                                                         00414100     
4141                                                                         00414200     
4142                               DP7185                             PAGE 7000414300     
4143                                                                         00414400     
4144                                                                         00414500     
4145                                                                         00414600     
4146            A term of the form x/y shall  be  an  error  if  y  is  zero,00414700     
4147            otherwise  the value of x/y shall be the result of dividing x00414800     
4148            by y.                                                        00414900     
4149                                                                         00415000     
4150                                                                         00415100     
4151            A term of the form i div j shall be an error if  j  is  zero,00415200     
4152            otherwise the value of i div j shall be such that            00415300     
4153                                                                         00415400     
4154                                                                         00415500     
4155                   abs(i) - abs(j) < abs((i div j) * j) <= abs(i)        00415600     
4156                                                                         00415700     
4157                                                                         00415800     
4158            where the value shall be zero if abs(i)<abs(j), otherwise the00415900     
4159            sign  of the value shall be positive if i and j have the same00416000     
4160            sign and negative if i and j have different signs.           00416100     
4161                                                                         00416200     
4162                                                                         00416300     
4163            A term of the form i mod j shall be an error if j is zero  or00416400     
4164            negative,  otherwise the value of i mod j shall be that value00416500     
4165            of (i-(k*j)) for integral k such that 0 <= i mod j < j.      00416600     
4166                                                                         00416700     
4167            NOTE:  Only for i >= 0 does the relation                     00416800     
4168                                                                         00416900     
4169                                                                         00417000     
4170                             (i div j) * j + i mod j = i                 00417100     
4171                                                                         00417200     
4172                                                                         00417300     
4173            hold.                                                        00417400     
4174                                                                         00417500     
4175                                                                         00417600     
4176            The  required  constant-identifier  maxint  shall  denote  an00417700     
4177            implementation-defined  value  of  integer-type.   This value00417800     
4178            shall satisfy the following conditions:                      00417900     
4179                                                                         00418000     
4180                                                                         00418100     
4181               a)  All  integral  values  in  the  closed  interval  from00418200     
4182                   -maxint   to   +maxint   shall   be   values   in  the00418300     
4183                   integer-type.                                         00418400     
4184                                                                         00418500     
4185                                                                         00418600     
4186               b)  Any monadic operation performed on an integer value in00418700     
4187                   this  interval  shall be correctly performed according00418800     
4188                   to the mathematical rules for integer arithmetic.     00418900     
4189                                                                         00419000     
4190                                                                         00419100     
4191               c)  Any dyadic integer operation on two integer values  in00419200     
4192                   this   same  interval  shall  be  correctly  performed00419300     
4193                   according  to  the  mathematical  rules  for   integer00419400     
4194                   arithmetic,  provided  that the result is also in this00419500     
4195                   interval.                                             00419600     
4196                                                                         00419700     
4197                                                                         00419800     
4198               d)  Any relational operation on two integer values in this00419900     
4199                                                                         00420000     
4200                                                                         00420100     
4201                                                                         00420200     
4202                               DP7185                            PAGE 71 00420300     
4203                                                                         00420400     
4204                                                                         00420500     
4205                                                                         00420600     
4206                   same  interval  shall be correctly performed according00420700     
4207                   to the mathematical rules for integer arithmetic.     00420800     
4208                                                                         00420900     
4209                                                                         00421000     
4210            The results of the real arithmetic  operators  and  functions00421100     
4211            shall  be  approximations  to  the corresponding mathematical00421200     
4212            results.   The  accuracy  of  this  approximation  shall   be00421300     
4213            implementation-defined.                                      00421400     
4214                                                                         00421500     
4215                                                                         00421600     
4216            It shall be an error if an integer operation or  function  is00421700     
4217            not performed according to the mathematical rules for integer00421800     
4218            arithmetic.                                                  00421900     
4219                                                                         00422000     
4220                                                                         00422100     
4221                                                                         00422200     
4222                                                                         00422300     
4223            6.7.2.3 BOOLEAN OPERATORS                                    00422400     
4224            -------------------------                                    00422500     
4225                                                                         00422600     
4226                                                                         00422700     
4227            Operands and results  for  Boolean  operations  shall  be  of00422800     
4228            Boolean-type.  Boolean operators or, and and not shall denote00422900     
4229            respectively   the   logical   operations   of   disjunction,00423000     
4230            conjunction and negation.                                    00423100     
4231                                                                         00423200     
4232                                                                         00423300     
4233                          Boolean-expression = expression .              00423400     
4234                                                                         00423500     
4235                                                                         00423600     
4236            A Boolean-expression shall be an expression  that  denotes  a00423700     
4237            value of Boolean-type.                                       00423800     
4238                                                                         00423900     
4239                                                                         00424000     
4240                                                                         00424100     
4241            6.7.2.4 SET OPERATORS                                        00424200     
4242            ---------------------                                        00424300     
4243                                                                         00424400     
4244                                                                         00424500     
4245            The types of operands and results for set operations shall be00424600     
4246            as shown in table 4.                                         00424700     
4247                                                                         00424800     
4248                                                                         00424900     
4249                                                                         00425000     
4250                                                                         00425100     
4251                                                                         00425200     
4252                                                                         00425300     
4253                                                                         00425400     
4254                                                                         00425500     
4255                                                                         00425600     
4256                                                                         00425700     
4257                                                                         00425800     
4258                                                                         00425900     
4259                                                                         00426000     
4260                                                                         00426100     
4261                                                                         00426200     
4262                               DP7185                             PAGE 7200426300     
4263                                                                         00426400     
4264                                                                         00426500     
4265                                                                         00426600     
4266                               Table 4. Set Operations                   00426700     
4267                               -----------------------                   00426800     
4268                                                                         00426900     
4269                                                                         00427000     
4270            operator  operation        type of operands   type of result 00427100     
4271            --------  ---------        ----------------   -------------- 00427200     
4272                                                                         00427300     
4273              +       set union          )                 )             00427400     
4274                                         )a                )             00427500     
4275                                                                         00427600     
4276              -       set difference     )canonical        )same as the  00427700     
4277                                         )set-of-T type    )operands     00427800     
4278                                                                         00427900     
4279              *       set intersection   )                 )             00428000     
4280                                                                         00428100     
4281                                                                         00428200     
4282                                                                         00428300     
4283                                                                         00428400     
4284                                                                         00428500     
4285            6.7.2.5 RELATIONAL OPERATORS                                 00428600     
4286            ----------------------------                                 00428700     
4287                                                                         00428800     
4288                                                                         00428900     
4289            The types of operands and results for  relational  operations00429000     
4290            shall be as shown in table 5.                                00429100     
4291                                                                         00429200     
4292                                                                         00429300     
4293                           Table 5. Relational Operations                00429400     
4294                           ------------------------------                00429500     
4295                                                                         00429600     
4296                                                                         00429700     
4297            operator   type of operands              type of result      00429800     
4298            --------   ----------------              --------------      00429900     
4299                                                                         00430000     
4300             = <>      any simple,                   Boolean-type        00430100     
4301                       pointer or string-type                            00430200     
4302                       or canonical set-of-T type                        00430300     
4303                                                                         00430400     
4304              < >      any simple or string-type     Boolean-type        00430500     
4305                                                                         00430600     
4306            <= >=      any simple or string-type     Boolean-type        00430700     
4307                       or canonical set-of-T type                        00430800     
4308                                                                         00430900     
4309              in       left operand:any ordinal      Boolean-type        00431000     
4310                       type T right operand:                             00431100     
4311                       a canonical set-of-T type                         00431200     
4312                       (see 6.7.1)                                       00431300     
4313                                                                         00431400     
4314                                                                         00431500     
4315            The operands of =, <>, <, >, >=, and <= shall  be  either  of00431600     
4316            compatible  types,  the  same canonical set-of-T type, or one00431700     
4317            operand shall be of real-type  and  the  other  shall  be  of00431800     
4318            integer-type.                                                00431900     
4319                                                                         00432000     
4320                                                                         00432100     
4321                                                                         00432200     
4322                               DP7185                             PAGE 7300432300     
4323                                                                         00432400     
4324                                                                         00432500     
4325                                                                         00432600     
4326            The operators =, <>, <, > shall stand for  "equal  to",  "not00432700     
4327            equal to", "less than" and "greater than" respectively.      00432800     
4328                                                                         00432900     
4329                                                                         00433000     
4330            Except when applied to sets, the operators <=  and  >=  shall00433100     
4331            stand  for "less than or equal to" and "greater than or equal00433200     
4332            to" respectively.                                            00433300     
4333                                                                         00433400     
4334                                                                         00433500     
4335            Where u and v denote simple-expressions of a set-type, u <= v00433600     
4336            shall  denote the inclusion of u in v and u >= v shall denote00433700     
4337            the inclusion of v in u.                                     00433800     
4338                                                                         00433900     
4339                                                                         00434000     
4340            NOTE:  Since the Boolean-type is an ordinal-type  with  false00434100     
4341            less than true, then if p and q are operands of Boolean-type,00434200     
4342            p = q denotes their equivalence and p <= q means p implies q.00434300     
4343                                                                         00434400     
4344                                                                         00434500     
4345            When the relational operators = , <> , < , > , <=  ,  >=  are00434600     
4346            used  to  compare  operands  of  compatible string-types (see00434700     
4347            6.4.3.2), they denote lexicographic relations defined  below.00434800     
4348            Lexicographic  ordering imposes a total ordering on values of00434900     
4349            a string-type.  If s1 and s2 are  two  values  of  compatible00435000     
4350            string-types then,                                           00435100     
4351                                                                         00435200     
4352                                                                         00435300     
4353              s1 = s2 iff for all i in [1..n]: s1[i] = s2[i]             00435400     
4354                                                                         00435500     
4355              s1 < s2 iff there exists a p in [1..n]:                    00435600     
4356                      (for all i in [1..p-1]: s1[i] = s2[i])             00435700     
4357                      and s1[p] < s2[p]                                  00435800     
4358                                                                         00435900     
4359                                                                         00436000     
4360            The operator in shall yield the value true if  the  value  of00436100     
4361            the  operand  of ordinal-type is a member of the value of the00436200     
4362            set-type, otherwise it shall yield the value false.          00436300     
4363                                                                         00436400     
4364                                                                         00436500     
4365                                                                         00436600     
4366                                                                         00436700     
4367         6.7.3 FUNCTION DESIGNATORS                                      00436800     
4368         --------------------------                                      00436900     
4369                                                                         00437000     
4370                                                                         00437100     
4371         A function-designator shall yield  the  value  of  the  function00437200     
4372         denoted  by  the function-identifier of the function-designator.00437300     
4373         The function-designator shall  specify  the  activation  of  the00437400     
4374         function.   If  the  function  has  any  formal  parameters  the00437500     
4375         function-designator shall contain a  list  of  actual-parameters00437600     
4376         that  shall  be  bound  to their corresponding formal parameters00437700     
4377         defined in the function-declaration.  The  correspondence  shall00437800     
4378         be  established  by the positions of the parameters in the lists00437900     
4379                                                                         00438000     
4380                                                                         00438100     
4381                                                                         00438200     
4382                               DP7185                             PAGE 7400438300     
4383                                                                         00438400     
4384                                                                         00438500     
4385                                                                         00438600     
4386         of actual and formal parameters  respectively.   The  number  of00438700     
4387         actual-parameters  shall  be  equal  to  the  number  of  formal00438800     
4388         parameters.  The types of the actual-parameters shall correspond00438900     
4389         to  the  types  of  the formal parameters as specified by 6.6.3.00439000     
4390         The  order  of  evaluation,  accessing  and   binding   of   the00439100     
4391         actual-parameters shall be implementation-dependent.            00439200     
4392                                                                         00439300     
4393                                                                         00439400     
4394           function-designator = function-identifier                     00439500     
4395                                  [ actual-parameter-list ] .            00439600     
4396           actual-parameter-list =                                       00439700     
4397               "(" actual-parameter { "," actual-parameter } ")" .       00439800     
4398           actual-parameter = expression | variable-access |             00439900     
4399                              procedure-identifier |                     00440000     
4400                              function-identifier .                      00440100     
4401                                                                         00440200     
4402                                                                         00440300     
4403         Examples:                                                       00440400     
4404                                                                         00440500     
4405                                                                         00440600     
4406                        Sum(a,63)                                        00440700     
4407                        GCD(147,k)                                       00440800     
4408                        sin(x+y)                                         00440900     
4409                        eof(f)                                           00441000     
4410                        ord(f^)                                          00441100     
4411                                                                         00441200     
4412                                                                         00441300     
4413                                                                         00441400     
4414      6.8 STATEMENTS                                                     00441500     
4415      --------------                                                     00441600     
4416                                                                         00441700     
4417                                                                         00441800     
4418                                                                         00441900     
4419         6.8.1 GENERAL                                                   00442000     
4420         -------------                                                   00442100     
4421                                                                         00442200     
4422                                                                         00442300     
4423         Statements  shall  denote  algorithmic  actions,  and  shall  be00442400     
4424         executable. They may be prefixed by a label.                    00442500     
4425                                                                         00442600     
4426                                                                         00442700     
4427         A label occurring in  a  statement  S  shall  be  designated  as00442800     
4428         prefixing S, and shall be allowed to occur in a goto-statement G00442900     
4429         (see 6.8.2.4)  if  and  only  if  any  of  the  following  three00443000     
4430         conditions is satisfied.                                        00443100     
4431                                                                         00443200     
4432                                                                         00443300     
4433         a) S contains G.                                                00443400     
4434                                                                         00443500     
4435                                                                         00443600     
4436         b) S is a statement of a statement-sequence containing G.       00443700     
4437                                                                         00443800     
4438                                                                         00443900     
4439                                                                         00444000     
4440                                                                         00444100     
4441                                                                         00444200     
4442                               DP7185                             PAGE 7500444300     
4443                                                                         00444400     
4444                                                                         00444500     
4445                                                                         00444600     
4446         c) S   is   a  statement  of  the  statement-sequence   of   the00444700     
4447            compound-statement   of   the  statement-part  of   a   block00444800     
4448            containing G.                                                00444900     
4449                                                                         00445000     
4450                                                                         00445100     
4451            statement = [ label ":" ] (simple-statement |                00445200     
4452                                       structured-statement ) .          00445300     
4453                                                                         00445400     
4454                                                                         00445500     
4455         NOTE:  A goto-statement within a block may refer to a  label  in00445600     
4456         an   enclosing   block,  provided  that  the  label  prefixes  a00445700     
4457         simple-statement or structured-statement at the outermost  level00445800     
4458         of nesting of the block.                                        00445900     
4459                                                                         00446000     
4460                                                                         00446100     
4461                                                                         00446200     
4462         6.8.2 SIMPLE STATEMENTS                                         00446300     
4463         -----------------------                                         00446400     
4464                                                                         00446500     
4465                                                                         00446600     
4466            6.8.2.1 GENERAL                                              00446700     
4467            ---------------                                              00446800     
4468                                                                         00446900     
4469                                                                         00447000     
4470            A simple-statement shall be  a  statement  not  containing  a00447100     
4471            statement.   An  empty-statement  shall contain no symbol and00447200     
4472            shall denote no action.                                      00447300     
4473                                                                         00447400     
4474                                                                         00447500     
4475              simple-statement =                                         00447600     
4476                  empty-statement | assignment-statement |               00447700     
4477                  procedure-statement | goto-statement .                 00447800     
4478              empty-statement = .                                        00447900     
4479                                                                         00448000     
4480                                                                         00448100     
4481                                                                         00448200     
4482            6.8.2.2 ASSIGNMENT-STATEMENTS                                00448300     
4483            -----------------------------                                00448400     
4484                                                                         00448500     
4485                                                                         00448600     
4486            An assignment-statement shall  attribute  the  value  of  the00448700     
4487            expression of the assignment-statement either to the variable00448800     
4488            denoted by the variable-access of  the  assignment-statement,00448900     
4489            or  to  the  function-identifier of the assignment-statement;00449000     
4490            the  value  shall  be  assignment-compatible  with  the  type00449100     
4491            possessed   by  the  variable  or  function-identifier.   The00449200     
4492            function-block     associated      (6.6.2)      with      the00449300     
4493            function-identifier  of an assignment-statement shall contain00449400     
4494            the assignment-statement.                                    00449500     
4495                                                                         00449600     
4496                                                                         00449700     
4497              assignment-statement =                                     00449800     
4498                    ( variable-access | function-identifier )            00449900     
4499                    ":=" expression .                                    00450000     
4500                                                                         00450100     
4501                                                                         00450200     
4502                               DP7185                             PAGE 7600450300     
4503                                                                         00450400     
4504                                                                         00450500     
4505                                                                         00450600     
4506            The decision as to the order of accessing  the  variable  and00450700     
4507            evaluating  the expression shall be implementation-dependent;00450800     
4508            the access shall establish a reference to the variable during00450900     
4509            the remaining execution of the assignment-statement.         00451000     
4510                                                                         00451100     
4511                                                                         00451200     
4512            The state of a variable or  function  when  the  variable  or00451300     
4513            function  does not have attributed to it a value specified by00451400     
4514            its type  shall  be  designated  undefined.   If  a  variable00451500     
4515            possesses  a  structured-type, the state of the variable when00451600     
4516            every component of the variable is totally-undefined shall be00451700     
4517            designated  totally-undefined.   Totally-undefined  shall  be00451800     
4518            synonymous with undefined if the variable does not possess  a00451900     
4519            structured-type.                                             00452000     
4520                                                                         00452100     
4521                                                                         00452200     
4522            Examples:                                                    00452300     
4523                                                                         00452400     
4524                                                                         00452500     
4525                      x := y+z                                           00452600     
4526                      p := (1<=i) and (i<100)                            00452700     
4527                      i := sqr(k) - (i*j)                                00452800     
4528                      hue1 := [blue,succ(c)]                             00452900     
4529                      p1^.mother := true                                 00453000     
4530                                                                         00453100     
4531                                                                         00453200     
4532                                                                         00453300     
4533            6.8.2.3 PROCEDURE-STATEMENTS                                 00453400     
4534            ----------------------------                                 00453500     
4535                                                                         00453600     
4536                                                                         00453700     
4537            A  procedure-statement  shall specify the activation  of  the00453800     
4538            block   of   the   procedure-block   associated   with    the00453900     
4539            procedure-identifier  of  the  procedure-statement.   If  the00454000     
4540            procedure has any formal parameters  the  procedure-statement00454100     
4541            shall contain an actual-parameter-list, which is the list  of00454200     
4542            actual-parameters that shall be bound to their  corresponding00454300     
4543            formal parameters defined in the  procedure-declaration.  The00454400     
4544            correspondence  shall be established by the positions of  the00454500     
4545            parameters  in  the  lists of actual  and  formal  parameters00454600     
4546            respectively. The number of actual-parameters shall be  equal00454700     
4547            to  the  number  of  formal  parameters.  The  types  of  the00454800     
4548            actual-parameters shall correspond to the types of the formal00454900     
4549            parameters as specified by 6.6.3.  The order  of  evaluation,00455000     
4550            accessing and  binding  of  the  actual-parameters  shall  be00455100     
4551            implementation-dependent.                                    00455200     
4552                                                                         00455300     
4553                                                                         00455400     
4554                procedure-statement = procedure-identifier               00455500     
4555                                        [ actual-parameter-list ] .      00455600     
4556                                                                         00455700     
4557                                                                         00455800     
4558                                                                         00455900     
4559                                                                         00456000     
4560                                                                         00456100     
4561                                                                         00456200     
4562                               DP7185                             PAGE 7700456300     
4563                                                                         00456400     
4564                                                                         00456500     
4565                                                                         00456600     
4566            Examples:                                                    00456700     
4567                                                                         00456800     
4568                                                                         00456900     
4569                      printheading                                       00457000     
4570                      transpose(a,n,m)                                   00457100     
4571                      bisect(fct,-1.0,+1.0,x)                            00457200     
4572                      AddVectors(m[1],(m[2]),(m[k]))                     00457300     
4573                                                                         00457400     
4574                                                                         00457500     
4575                                                                         00457600     
4576            6.8.2.4 GOTO STATEMENTS                                      00457700     
4577            -----------------------                                      00457800     
4578                                                                         00457900     
4579                                                                         00458000     
4580            A goto-statement shall indicate that further processing is to00458100     
4581            continue  at  the  program-point  denoted by the label in the00458200     
4582            goto-statement  and  shall  cause  the  termination  of   all00458300     
4583            activations except                                           00458400     
4584                                                                         00458500     
4585                                                                         00458600     
4586            a) the activation containing the program-point and           00458700     
4587                                                                         00458800     
4588                                                                         00458900     
4589            b) any  activation  containing  the  activation-point  of  an00459000     
4590               activation   required   by  these  exceptions  not  to  be00459100     
4591               terminated.                                               00459200     
4592                                                                         00459300     
4593                                                                         00459400     
4594                           goto-statement = "goto" label .               00459500     
4595                                                                         00459600     
4596                                                                         00459700     
4597                                                                         00459800     
4598                                                                         00459900     
4599         6.8.3 STRUCTURED-STATEMENTS                                     00460000     
4600         ---------------------------                                     00460100     
4601                                                                         00460200     
4602                                                                         00460300     
4603            6.8.3.1 GENERAL                                              00460400     
4604            ---------------                                              00460500     
4605                                                                         00460600     
4606                                                                         00460700     
4607               structured-statement =                                    00460800     
4608                   compound-statement | conditional-statement |          00460900     
4609                   repetitive-statement | with-statement .               00461000     
4610               statement-sequence = statement { ";" statement } .        00461100     
4611                                                                         00461200     
4612                                                                         00461300     
4613            The execution of a statement-sequence specifies the execution00461400     
4614            of the statements of the statement-sequence in textual order,00461500     
4615            except as modifed by execution of a goto-statement.          00461600     
4616                                                                         00461700     
4617                                                                         00461800     
4618                                                                         00461900     
4619                                                                         00462000     
4620                                                                         00462100     
4621                                                                         00462200     
4622                               DP7185                             PAGE 7800462300     
4623                                                                         00462400     
4624                                                                         00462500     
4625                                                                         00462600     
4626            6.8.3.2 COMPOUND-STATEMENTS                                  00462700     
4627            ---------------------------                                  00462800     
4628                                                                         00462900     
4629                                                                         00463000     
4630            A  compound-statement  shall   specify   execution   of   the00463100     
4631            statement-sequence of the compound-statement.                00463200     
4632                                                                         00463300     
4633                                                                         00463400     
4634                compound-statement = "begin" statement-sequence "end" .  00463500     
4635                                                                         00463600     
4636                                                                         00463700     
4637            Example:                                                     00463800     
4638                                                                         00463900     
4639                                                                         00464000     
4640                          begin z := x ; x := y; y := z end              00464100     
4641                                                                         00464200     
4642                                                                         00464300     
4643                                                                         00464400     
4644            6.8.3.3 CONDITIONAL-STATEMENTS                               00464500     
4645            ------------------------------                               00464600     
4646                                                                         00464700     
4647                                                                         00464800     
4648               conditional-statement = if-statement | case-statement .   00464900     
4649                                                                         00465000     
4650                                                                         00465100     
4651                                                                         00465200     
4652            6.8.3.4 IF-STATEMENTS                                        00465300     
4653            ---------------------                                        00465400     
4654                                                                         00465500     
4655                                                                         00465600     
4656              if-statement = "if" Boolean-expression "then" statement    00465700     
4657                             [ else-part ] .                             00465800     
4658              else-part = "else" statement .                             00465900     
4659                                                                         00466000     
4660                                                                         00466100     
4661            If the Boolean-expression  of  the  if-statement  yields  the00466200     
4662            value  true,  the  statement  of  the  if-statement  shall be00466300     
4663            executed.  If the Boolean-expression yields the value  false,00466400     
4664            the  statement  of the if-statement shall not be executed and00466500     
4665            the statement of the else-part (if any) shall be executed.   00466600     
4666                                                                         00466700     
4667                                                                         00466800     
4668            An if-statement without an else-part shall not be followed by00466900     
4669            the token else.                                              00467000     
4670                                                                         00467100     
4671                                                                         00467200     
4672            NOTE:  An else-part thus is paired with the nearest preceding00467300     
4673            otherwise unpaired then.                                     00467400     
4674                                                                         00467500     
4675                                                                         00467600     
4676            Examples:                                                    00467700     
4677                                                                         00467800     
4678                                                                         00467900     
4679                                                                         00468000     
4680                                                                         00468100     
4681                                                                         00468200     
4682                               DP7185                             PAGE 7900468300     
4683                                                                         00468400     
4684                                                                         00468500     
4685                                                                         00468600     
4686                 if x < 1.5 then z := x+y else z := 1.5                  00468700     
4687                 if p1 <> nil then p1 := p1^.father                      00468800     
4688                 if j = 0 then                                           00468900     
4689                   if i = 0 then writeln('indefinite')                   00469000     
4690                   else writeln('infinite')                              00469100     
4691                 else writeln( i / j )                                   00469200     
4692                                                                         00469300     
4693                                                                         00469400     
4694                                                                         00469500     
4695            6.8.3.5 CASE-STATEMENTS                                      00469600     
4696            -----------------------                                      00469700     
4697                                                                         00469800     
4698                                                                         00469900     
4699            The   values   denoted   by   the   case-constants   of   the00470000     
4700            case-constant-lists    of   the   case-list-elements   of   a00470100     
4701            case-statement shall be distinct and of the same ordinal-type00470200     
4702            as  the  expression  of the case-index of the case-statement.00470300     
4703            On execution of the case-statement the  case-index  shall  be00470400     
4704            evaluated.   That  value  shall then specify execution of the00470500     
4705            statement of  the  case-list-element  closest-containing  the00470600     
4706            case-constant denoting that value.  One of the case-constants00470700     
4707            shall be equal to the value of the case-index upon  entry  to00470800     
4708            the case-statement.                                          00470900     
4709                                                                         00471000     
4710                                                                         00471100     
4711            It shall be an error if none of the case-constants  is  equal00471200     
4712            to   the   value   of   the  case-index  upon  entry  to  the00471300     
4713            case-statement.                                              00471400     
4714                                                                         00471500     
4715                                                                         00471600     
4716            NOTE:  Case-constants are not the same as statement labels.  00471700     
4717                                                                         00471800     
4718                                                                         00471900     
4719              case-statement =                                           00472000     
4720                 "case" case-index "of"                                  00472100     
4721                 case-list-element {";" case-list-element } [";"] "end" .00472200     
4722              case-list-element = case-constant-list ":" statement .     00472300     
4723              case-index = expression .                                  00472400     
4724                                                                         00472500     
4725                                                                         00472600     
4726            Example:                                                     00472700     
4727                                                                         00472800     
4728                                                                         00472900     
4729              case operator of                                           00473000     
4730                plus:   x := x+y;                                        00473100     
4731                minus:  x := x-y;                                        00473200     
4732                times:  x := x*y                                         00473300     
4733              end                                                        00473400     
4734                                                                         00473500     
4735                                                                         00473600     
4736                                                                         00473700     
4737                                                                         00473800     
4738                                                                         00473900     
4739                                                                         00474000     
4740                                                                         00474100     
4741                                                                         00474200     
4742                               DP7185                             PAGE 8000474300     
4743                                                                         00474400     
4744                                                                         00474500     
4745                                                                         00474600     
4746            6.8.3.6 REPETITIVE- STATEMENTS                               00474700     
4747            ------------------------------                               00474800     
4748                                                                         00474900     
4749                                                                         00475000     
4750            Repetitive-statements  shall specify that certain  statements00475100     
4751            are to be executed repeatedly.                               00475200     
4752                                                                         00475300     
4753                                                                         00475400     
4754              repetitive-statement = repeat-statement |                  00475500     
4755                                       while-statement | for-statement . 00475600     
4756                                                                         00475700     
4757                                                                         00475800     
4758                                                                         00475900     
4759            6.8.3.7 REPEAT-STATEMENTS                                    00476000     
4760            -------------------------                                    00476100     
4761                                                                         00476200     
4762                                                                         00476300     
4763            repeat-statement = "repeat" statement-sequence               00476400     
4764                               "until" Boolean-expression .              00476500     
4765                                                                         00476600     
4766                                                                         00476700     
4767            The  statement-sequence  of  the  repeat-statement  shall  be00476800     
4768            repeatedly executed (except as modified by the execution of a00476900     
4769            goto-statement)   until   the   Boolean-expression   of   the00477000     
4770            repeat-statement yields the value true on completion  of  the00477100     
4771            statement-sequence. The statement-sequence shall be  executed00477200     
4772            at least once,  because the Boolean-expression  is  evaluated00477300     
4773            after execution of the statement-sequence.                   00477400     
4774                                                                         00477500     
4775                                                                         00477600     
4776            Example:                                                     00477700     
4777                                                                         00477800     
4778                                                                         00477900     
4779              repeat k := i mod j;                                       00478000     
4780                i := j;                                                  00478100     
4781                j := k                                                   00478200     
4782              until j = 0                                                00478300     
4783                                                                         00478400     
4784                                                                         00478500     
4785                                                                         00478600     
4786            6.8.3.8 WHILE STATEMENTS                                     00478700     
4787            ------------------------                                     00478800     
4788                                                                         00478900     
4789                                                                         00479000     
4790            while-statement = "while" Boolean-expression "do" statement .00479100     
4791                                                                         00479200     
4792                                                                         00479300     
4793            The while-statement                                          00479400     
4794                                                                         00479500     
4795                                                                         00479600     
4796                 while b do body                                         00479700     
4797                                                                         00479800     
4798                                                                         00479900     
4799                                                                         00480000     
4800                                                                         00480100     
4801                                                                         00480200     
4802                               DP7185                             PAGE 8100480300     
4803                                                                         00480400     
4804                                                                         00480500     
4805                                                                         00480600     
4806            shall be equivalent to                                       00480700     
4807                                                                         00480800     
4808                 begin                                                   00480900     
4809                 if b then                                               00481000     
4810                   repeat                                                00481100     
4811                   body                                                  00481200     
4812                   until not (b)                                         00481300     
4813                 end                                                     00481400     
4814                                                                         00481500     
4815                                                                         00481600     
4816            Examples:                                                    00481700     
4817                                                                         00481800     
4818                                                                         00481900     
4819                 while i>0 do                                            00482000     
4820                   begin if odd(i) then z := z*x;                        00482100     
4821                     i := i div 2;                                       00482200     
4822                     x := sqr(x)                                         00482300     
4823                   end                                                   00482400     
4824                                                                         00482500     
4825                 while not eof(f) do                                     00482600     
4826                   begin process(f^ ); get(f)                            00482700     
4827                   end                                                   00482800     
4828                                                                         00482900     
4829                                                                         00483000     
4830                                                                         00483100     
4831            6.8.3.9 FOR-STATEMENTS                                       00483200     
4832            ----------------------                                       00483300     
4833                                                                         00483400     
4834                                                                         00483500     
4835            The for-statement shall specify that  the  statement  of  the00483600     
4836            for-statement   is   to   be   repeatedly  executed  while  a00483700     
4837            progression of values is attributed to  a  variable  that  is00483800     
4838            designated the control-variable of the for-statement.        00483900     
4839                                                                         00484000     
4840                                                                         00484100     
4841              for-statement = "for" control-variable ":=" initial-value  00484200     
4842                              ( "to" | "downto" ) final-value            00484300     
4843                              "do" statement .                           00484400     
4844              control-variable = entire-variable .                       00484500     
4845              initial-value = expression .                               00484600     
4846              final-value = expression .                                 00484700     
4847                                                                         00484800     
4848                                                                         00484900     
4849            The  control-variable  shall  be  an  entire-variable   whose00485000     
4850            identifier  is  declared  in the variable-declaration-part of00485100     
4851            the  block   closest-containing   the   for-statement.    The00485200     
4852            control-variable  shall  possess  an  ordinal-type,  and  the00485300     
4853            initial-value and final-value shall be of a  type  compatible00485400     
4854            with  this  type.  The statement of a for-statement shall not00485500     
4855            contain   an   assigning-reference   (see   6.5.1)   to   the00485600     
4856            control-variable  of  the  for-statement.   The  value of the00485700     
4857            final-value   shall   be   assignment-compatible   with   the00485800     
4858            control-variable  when  the  initial-value is assigned to the00485900     
4859                                                                         00486000     
4860                                                                         00486100     
4861                                                                         00486200     
4862                               DP7185                             PAGE 8200486300     
4863                                                                         00486400     
4864                                                                         00486500     
4865                                                                         00486600     
4866            control-variable.  After a for-statement is  executed  (other00486700     
4867            than  being  left  by a goto-statement leading out of it) the00486800     
4868            control-variable  shall  be  undefined.    Apart   from   the00486900     
4869            restrictions imposed by these requirements, the for-statement00487000     
4870                                                                         00487100     
4871                                                                         00487200     
4872                              for v := e1 to e2 do body                  00487300     
4873                                                                         00487400     
4874                                                                         00487500     
4875            shall be equivalent to                                       00487600     
4876                                                                         00487700     
4877                                                                         00487800     
4878              begin                                                      00487900     
4879              temp1 := e1;                                               00488000     
4880              temp2 := e2;                                               00488100     
4881              if temp1 <= temp2 then                                     00488200     
4882                begin                                                    00488300     
4883                v := temp1;                                              00488400     
4884                body;                                                    00488500     
4885                while v <> temp2 do                                      00488600     
4886                  begin                                                  00488700     
4887                  v := succ(v);                                          00488800     
4888                  body                                                   00488900     
4889                  end                                                    00489000     
4890                end                                                      00489100     
4891              end                                                        00489200     
4892                                                                         00489300     
4893                                                                         00489400     
4894            and the for-statement                                        00489500     
4895                                                                         00489600     
4896                                                                         00489700     
4897              for v := e1 downto e2 do body                              00489800     
4898                                                                         00489900     
4899                                                                         00490000     
4900            shall be equivalent to                                       00490100     
4901                                                                         00490200     
4902                                                                         00490300     
4903              begin                                                      00490400     
4904              temp1 := e1;                                               00490500     
4905              temp2 := e2;                                               00490600     
4906              if temp1 >= temp2 then                                     00490700     
4907                begin                                                    00490800     
4908                v := temp1;                                              00490900     
4909                body;                                                    00491000     
4910                while v <> temp2 do                                      00491100     
4911                  begin                                                  00491200     
4912                  v := pred(v);                                          00491300     
4913                  body                                                   00491400     
4914                  end                                                    00491500     
4915                end                                                      00491600     
4916              end                                                        00491700     
4917                                                                         00491800     
4918                                                                         00491900     
4919                                                                         00492000     
4920                                                                         00492100     
4921                                                                         00492200     
4922                               DP7185                             PAGE 8300492300     
4923                                                                         00492400     
4924                                                                         00492500     
4925                                                                         00492600     
4926            where temp1 and temp2 denote  auxiliary  variables  that  the00492700     
4927            program does not otherwise contain, and that possess the type00492800     
4928            possessed  by  the  variable  v  if  that  type  is   not   a00492900     
4929            subrange-type;  otherwise the host type of the type possessed00493000     
4930            by the variable v.                                           00493100     
4931                                                                         00493200     
4932                                                                         00493300     
4933            Examples:                                                    00493400     
4934                                                                         00493500     
4935                                                                         00493600     
4936              for i := 2 to 63 do                                        00493700     
4937                if a[i] > max then max := a[i]                           00493800     
4938                                                                         00493900     
4939              for i := 1 to 10 do                                        00494000     
4940                for j := 1 to 10 do                                      00494100     
4941                  begin                                                  00494200     
4942                  x := 0;                                                00494300     
4943                  for k := 1 to 10 do                                    00494400     
4944                    x := x + m1[i,k]*m2[k,j];                            00494500     
4945                  m[i,j] := x                                            00494600     
4946                  end                                                    00494700     
4947                                                                         00494800     
4948              for i := 1 to 10 do                                        00494900     
4949                for j := 1 to i-1 do                                     00495000     
4950                  m[i][j] := 0.0                                         00495100     
4951                                                                         00495200     
4952              for c := blue downto red do q(c)                           00495300     
4953                                                                         00495400     
4954                                                                         00495500     
4955                                                                         00495600     
4956            6.8.3.10 WITH-STATEMENTS                                     00495700     
4957            ------------------------                                     00495800     
4958                                                                         00495900     
4959                                                                         00496000     
4960              with-statement =                                           00496100     
4961                   "with" record-variable-list "do"                      00496200     
4962                   statement .                                           00496300     
4963              record-variable-list =                                     00496400     
4964                   record-variable { "," record-variable } .             00496500     
4965                                                                         00496600     
4966                                                                         00496700     
4967            A with-statement shall specify the execution of the statement00496800     
4968            of  the  with-statement.  The occurrence of a record-variable00496900     
4969            as the only record-variable in the record-variable-list of  a00497000     
4970            with-statement  shall  constitute a defining-point of each of00497100     
4971            the  field-identifiers  associated  with  components  of  the00497200     
4972            record-type   possessed   by   the   record-variable   as   a00497300     
4973            field-designator-identifier  for  the  region  which  is  the00497400     
4974            statement  of the with-statement;  each applied occurrence of00497500     
4975            a field-designator-identifier shall denote that component  of00497600     
4976            the    record-variable   which   is   associated   with   the00497700     
4977            field-identifier by  the  record-type.   The  record-variable00497800     
4978            shall  be accessed before the statement of the with-statement00497900     
4979                                                                         00498000     
4980                                                                         00498100     
4981                                                                         00498200     
4982                               DP7185                             PAGE 8400498300     
4983                                                                         00498400     
4984                                                                         00498500     
4985                                                                         00498600     
4986            is executed, and that access shall establish a  reference  to00498700     
4987            the  variable during the entire execution of the statement of00498800     
4988            the with-statement.                                          00498900     
4989                                                                         00499000     
4990                                                                         00499100     
4991            The statement                                                00499200     
4992                                                                         00499300     
4993                                                                         00499400     
4994                 with v1,v2, ...,vn do s                                 00499500     
4995                                                                         00499600     
4996                                                                         00499700     
4997            shall be equivalent to                                       00499800     
4998                                                                         00499900     
4999                                                                         00500000     
5000                 with v1 do                                              00500100     
5001                   with v2 do                                            00500200     
5002                     ...                                                 00500300     
5003                       with vn do s                                      00500400     
5004                                                                         00500500     
5005                                                                         00500600     
5006            Example:                                                     00500700     
5007                                                                         00500800     
5008                                                                         00500900     
5009                with date do                                             00501000     
5010                if month = 12 then                                       00501100     
5011                  begin month := 1; year := year + 1                     00501200     
5012                  end                                                    00501300     
5013                else month := month + 1                                  00501400     
5014                                                                         00501500     
5015                                                                         00501600     
5016            shall be equivalent to                                       00501700     
5017                                                                         00501800     
5018                                                                         00501900     
5019                if date.month = 12 then                                  00502000     
5020                  begin date.month := 1; date.year := date.year+1        00502100     
5021                  end                                                    00502200     
5022                else date.month := date.month+1                          00502300     
5023                                                                         00502400     
5024                                                                         00502500     
5025                                                                         00502600     
5026                                                                         00502700     
5027                                                                         00502800     
5028                                                                         00502900     
5029                                                                         00503000     
5030                                                                         00503100     
5031                                                                         00503200     
5032                                                                         00503300     
5033                                                                         00503400     
5034                                                                         00503500     
5035                                                                         00503600     
5036                                                                         00503700     
5037                                                                         00503800     
5038                                                                         00503900     
5039                                                                         00504000     
5040                                                                         00504100     
5041                                                                         00504200     
5042                               DP7185                             PAGE 8500504300     
5043                                                                         00504400     
5044                                                                         00504500     
5045                                                                         00504600     
5046      6.9 INPUT AND OUTPUT                                               00504700     
5047      --------------------                                               00504800     
5048                                                                         00504900     
5049                                                                         00505000     
5050         6.9.1 GENERAL                                                   00505100     
5051         -------------                                                   00505200     
5052                                                                         00505300     
5053                                                                         00505400     
5054         Textfiles   (see   6.4.3.5)   that   are   identified   in   the00505500     
5055         program-parameters  (see 6.10) to a Pascal program shall provide00505600     
5056         legible input and output.                                       00505700     
5057                                                                         00505800     
5058                                                                         00505900     
5059                                                                         00506000     
5060                                                                         00506100     
5061         6.9.2 THE PROCEDURE READ                                        00506200     
5062         ------------------------                                        00506300     
5063                                                                         00506400     
5064                                                                         00506500     
5065         The syntax of the parameter list  of  read  when  applied  to  a00506600     
5066         textfile shall be:                                              00506700     
5067                                                                         00506800     
5068                                                                         00506900     
5069           read-parameter-list =                                         00507000     
5070               "("[file-variable ","] variable-access                    00507100     
5071               {"," variable-access}")" .                                00507200     
5072                                                                         00507300     
5073                                                                         00507400     
5074         If the file-variable is omitted, the procedure shall be  applied00507500     
5075         to the required textfile input.                                 00507600     
5076                                                                         00507700     
5077                                                                         00507800     
5078         The following requirements shall apply for  the  procedure  read00507900     
5079         (where f denotes a textfile and v1...vn denote variable-accesses00508000     
5080         possessing the char-type  (or  a  subrange  of  char-type),  the00508100     
5081         integer-type (or a subrange of integer-type), or the real-type):00508200     
5082                                                                         00508300     
5083                                                                         00508400     
5084            a)  read(f,v1,...,vn) shall be equivalent to                 00508500     
5085                                                                         00508600     
5086                                                                         00508700     
5087                         begin read(f,v1); ... ; read(f,vn) end          00508800     
5088                                                                         00508900     
5089                                                                         00509000     
5090            b)  If v is a variable-access possessing  the  char-type  (or00509100     
5091                subrange thereof), read(f,v) shall be equivalent to      00509200     
5092                                                                         00509300     
5093                                                                         00509400     
5094                               begin v := f^; get (f) end                00509500     
5095                                                                         00509600     
5096                                                                         00509700     
5097                NOTE:  The variable-access is not a  variable  parameter.00509800     
5098                Consequently  it may be a component of a packed structure00509900     
5099                                                                         00510000     
5100                                                                         00510100     
5101                                                                         00510200     
5102                               DP7185                             PAGE 8600510300     
5103                                                                         00510400     
5104                                                                         00510500     
5105                                                                         00510600     
5106                and  the  value  of  the  buffer-variable  need  only  be00510700     
5107                assignment-compatible with it.                           00510800     
5108                                                                         00510900     
5109                                                                         00511000     
5110            c)  If v is a variable-access possessing the integer-type (or00511100     
5111                subrange thereof), read(f,v) shall cause the reading from00511200     
5112                f of a sequence  of  characters.   Preceding  spaces  and00511300     
5113                end-of-lines  shall  be skipped.  It shall be an error if00511400     
5114                the rest of the sequence does not form  a  signed-integer00511500     
5115                according  to  the  syntax  of  6.1.5.   The value of the00511600     
5116                signed-integer thus read shall  be  assignment-compatible00511700     
5117                with  the type possessed by v, and shall be attributed to00511800     
5118                v.  Reading shall cease as soon as the buffer-variable f^00511900     
5119                does  not  have attributed to it a character contained by00512000     
5120                the   longest   sequence   available   that    forms    a00512100     
5121                signed-integer.                                          00512200     
5122                                                                         00512300     
5123                                                                         00512400     
5124            d)  If v  is  a  variable-access  possessing  the  real-type,00512500     
5125                read(f,v) shall cause the reading from f of a sequence of00512600     
5126                characters.  Preceding spaces and end-of-lines  shall  be00512700     
5127                skipped.   It  shall  be  an  error  if  the  rest of the00512800     
5128                sequence does not form a signed-number according  to  the00512900     
5129                syntax  of  6.1.5.   The value denoted by the number thus00513000     
5130                read shall be attributed  to  the  variable  v.   Reading00513100     
5131                shall  cease  as  soon as the buffer-variable f^ does not00513200     
5132                have attributed  to  it  a  character  contained  by  the00513300     
5133                longest sequence available that forms a signed-number.   00513400     
5134                                                                         00513500     
5135                                                                         00513600     
5136            e)  When read is applied to f, it shall be an  error  if  the00513700     
5137                buffer-variable f^ is undefined or the pre-assertions for00513800     
5138                get do not hold (see 6.4.3.5).                           00513900     
5139                                                                         00514000     
5140                                                                         00514100     
5141                                                                         00514200     
5142                                                                         00514300     
5143         6.9.3 THE PROCEDURE READLN                                      00514400     
5144         --------------------------                                      00514500     
5145                                                                         00514600     
5146                                                                         00514700     
5147         The syntax of the parameter list of readln shall be:            00514800     
5148                                                                         00514900     
5149                                                                         00515000     
5150           readln-parameter-list =                                       00515100     
5151              ["(" (file-variable | variable-access)                     00515200     
5152              {"," variable-access} ")"] .                               00515300     
5153                                                                         00515400     
5154                                                                         00515500     
5155         Readln shall only be applied to textfiles.  If the file-variable00515600     
5156         or  the  entire  readln-parameter-list is omitted, the procedure00515700     
5157         shall be applied to the required textfile input.                00515800     
5158                                                                         00515900     
5159                                                                         00516000     
5160                                                                         00516100     
5161                                                                         00516200     
5162                               DP7185                             PAGE 8700516300     
5163                                                                         00516400     
5164                                                                         00516500     
5165                                                                         00516600     
5166         readln(f,v1,...,vn) shall be equivalent to                      00516700     
5167                                                                         00516800     
5168                                                                         00516900     
5169                        begin read(f,v1,...,vn); readln(f) end           00517000     
5170                                                                         00517100     
5171                                                                         00517200     
5172         readln(f) shall be equivalent to                                00517300     
5173                                                                         00517400     
5174                                                                         00517500     
5175                    begin while not eoln(f) do get(f); get(f) end        00517600     
5176                                                                         00517700     
5177                                                                         00517800     
5178         NOTE:  The effect  of  readln  is  to  place  the  current  file00517900     
5179         position  just past the end of the current line in the textfile.00518000     
5180         Unless this  is  the  end-of-file  position,  the  current  file00518100     
5181         position is therefore at the start of the next line.            00518200     
5182                                                                         00518300     
5183                                                                         00518400     
5184                                                                         00518500     
5185                                                                         00518600     
5186         6.9.4 THE PROCEDURE WRITE                                       00518700     
5187         -------------------------                                       00518800     
5188                                                                         00518900     
5189                                                                         00519000     
5190         The syntax of the parameter list of  write  when  applied  to  a00519100     
5191         textfile shall be:                                              00519200     
5192                                                                         00519300     
5193                                                                         00519400     
5194           write-parameter-list =                                        00519500     
5195              "("[file-variable ","] write-parameter                     00519600     
5196              {"," write-parameter}")" .                                 00519700     
5197           write-parameter =                                             00519800     
5198              expression [":" expression [":" expression ] ] .           00519900     
5199                                                                         00520000     
5200                                                                         00520100     
5201         If the file-variable is omitted, the procedure shall be  applied00520200     
5202         to  the  required  textfile  output.  When write is applied to a00520300     
5203         textfile f, it shall be an error if f  is  undefined  or  f.M  =00520400     
5204         Inspection (see 6.4.3.5).  An application of write to a textfile00520500     
5205         f shall cause the buffer-variable f^ to become undefined.       00520600     
5206                                                                         00520700     
5207                                                                         00520800     
5208                                                                         00520900     
5209                                                                         00521000     
5210                                                                         00521100     
5211                                                                         00521200     
5212                                                                         00521300     
5213                                                                         00521400     
5214                                                                         00521500     
5215                                                                         00521600     
5216                                                                         00521700     
5217                                                                         00521800     
5218                                                                         00521900     
5219                                                                         00522000     
5220                                                                         00522100     
5221                                                                         00522200     
5222                               DP7185                             PAGE 8800522300     
5223                                                                         00522400     
5224                                                                         00522500     
5225                                                                         00522600     
5226            6.9.4.1 MULTIPLE PARAMETERS                                  00522700     
5227            ---------------------------                                  00522800     
5228                                                                         00522900     
5229                                                                         00523000     
5230            Write(f,p1,...,pn) shall be equivalent to                    00523100     
5231                                                                         00523200     
5232                                                                         00523300     
5233                      begin write(f,p1); ... ; write(f,pn) end           00523400     
5234                                                                         00523500     
5235                                                                         00523600     
5236            where  f   denotes   a   textfile,   and   p1,...,pn   denote00523700     
5237            write-parameters.                                            00523800     
5238                                                                         00523900     
5239                                                                         00524000     
5240            6.9.4.2 WRITE-PARAMETERS                                     00524100     
5241            ------------------------                                     00524200     
5242                                                                         00524300     
5243                                                                         00524400     
5244            The write-parameters p shall have the following forms:       00524500     
5245                                                                         00524600     
5246                                                                         00524700     
5247                     e:TotalWidth:FracDigits   e:TotalWidth    e         00524800     
5248                                                                         00524900     
5249                                                                         00525000     
5250            where e is an expression whose value is to be written on  the00525100     
5251            file  f  and  may  be  of integer-type, real-type, char-type,00525200     
5252            Boolean-type or  a  string-type,  and  where  TotalWidth  and00525300     
5253            FracDigits  are expressions of integer-type whose values  are00525400     
5254            the field-width parameters.  The  values  of  TotalWidth  and00525500     
5255            Fracdigits shall be greater than or equal to one; it shall be00525600     
5256            an error if either value is less than one.                   00525700     
5257                                                                         00525800     
5258                                                                         00525900     
5259            Write(f,e)    shall    be    equivalent    to    the     form00526000     
5260            write(f,e:TotalWidth), using a default value  for  TotalWidth00526100     
5261            that depends on the type of e;  for  integer-type,  real-type00526200     
5262            and   Boolean-type    the    default    values    shall    be00526300     
5263            implementation-defined.                                      00526400     
5264                                                                         00526500     
5265                                                                         00526600     
5266            Write(f,e:TotalWidth:FracDigits) shall be applicable only  if00526700     
5267            e is of real-type (see 6.9.4.5.2).                           00526800     
5268                                                                         00526900     
5269                                                                         00527000     
5270                                                                         00527100     
5271                                                                         00527200     
5272                                                                         00527300     
5273                                                                         00527400     
5274                                                                         00527500     
5275                                                                         00527600     
5276                                                                         00527700     
5277                                                                         00527800     
5278                                                                         00527900     
5279                                                                         00528000     
5280                                                                         00528100     
5281                                                                         00528200     
5282                               DP7185                             PAGE 8900528300     
5283                                                                         00528400     
5284                                                                         00528500     
5285                                                                         00528600     
5286            6.9.4.3 CHAR-TYPE                                            00528700     
5287            -----------------                                            00528800     
5288                                                                         00528900     
5289                                                                         00529000     
5290            If e is of char-type, the default value of  TotalWidth  shall00529100     
5291            be one.  The representation written on the file f shall be:  00529200     
5292                                                                         00529300     
5293                                                                         00529400     
5294                 (TotalWidth - 1) spaces,                                00529500     
5295                 the character value of e.                               00529600     
5296                                                                         00529700     
5297                                                                         00529800     
5298            6.9.4.4 INTEGER-TYPE                                         00529900     
5299            --------------------                                         00530000     
5300                                                                         00530100     
5301                                                                         00530200     
5302            If e is of integer-type,  the  decimal  representation  of  e00530300     
5303            shall be written on the file f.  Assume a function           00530400     
5304                                                                         00530500     
5305                                                                         00530600     
5306               function IntegerSize ( x : integer ) : integer;           00530700     
5307                 { returns the number of digits, z, such that            00530800     
5308                 10 to the power (z-1) <= abs(x) < 10 to the power z }   00530900     
5309                                                                         00531000     
5310                                                                         00531100     
5311            and let IntDigits be the positive integer defined by:        00531200     
5312                                                                         00531300     
5313                                                                         00531400     
5314               if e = 0                                                  00531500     
5315               then IntDigits := 1                                       00531600     
5316                 else IntDigits := IntegerSize (e);                      00531700     
5317                                                                         00531800     
5318                                                                         00531900     
5319            then the representation shall consist of:                    00532000     
5320                                                                         00532100     
5321                                                                         00532200     
5322               (1) if TotalWidth >= IntDigits + 1 :                      00532300     
5323                  (TotalWidth - IntDigits - 1) spaces,                   00532400     
5324                  the sign character: '-' if e < 0, otherwise a space,   00532500     
5325                  IntDigits digit-characters of the decimal              00532600     
5326                  representation of abs(e).                              00532700     
5327                                                                         00532800     
5328               (2) If TotalWidth < IntDigits + 1:                        00532900     
5329                  if e < 0 the sign character '-',                       00533000     
5330                  IntDigits digit-characters of the decimal              00533100     
5331                  representation of abs(e).                              00533200     
5332                                                                         00533300     
5333                                                                         00533400     
5334                                                                         00533500     
5335                                                                         00533600     
5336                                                                         00533700     
5337                                                                         00533800     
5338                                                                         00533900     
5339                                                                         00534000     
5340                                                                         00534100     
5341                                                                         00534200     
5342                               DP7185                             PAGE 9000534300     
5343                                                                         00534400     
5344                                                                         00534500     
5345                                                                         00534600     
5346            6.9.4.5 REAL-TYPE                                            00534700     
5347            -----------------                                            00534800     
5348                                                                         00534900     
5349                                                                         00535000     
5350            If e is of real-type, a decimal representation of the  number00535100     
5351            e,  rounded to the specified number of significant figures or00535200     
5352            decimal places, shall be written on the file f.              00535300     
5353                                                                         00535400     
5354                                                                         00535500     
5355                                                                         00535600     
5356                                                                         00535700     
5357               6.9.4.5.1 THE FLOATING-POINT REPRESENTATION               00535800     
5358               -------------------------------------------               00535900     
5359                                                                         00536000     
5360                                                                         00536100     
5361               Write(f,e:TotalWidth)   shall   cause   a   floating-point00536200     
5362               representation of e to be written.  Assume functions      00536300     
5363                                                                         00536400     
5364                                                                         00536500     
5365                  function TenPower ( Int : integer ) : real ;           00536600     
5366                    { Returns 10.0 raised to the power Int }             00536700     
5367                                                                         00536800     
5368                  function RealSize ( y : real ) : integer;              00536900     
5369                    { Returns the value, z, such that                    00537000     
5370                    TenPower(z-1) <= abs(y) < TenPower(z) }              00537100     
5371                                                                         00537200     
5372                    function Truncate ( y : real ; DecPlaces : integer ) 00537300     
5373                      : real ;                                           00537400     
5374                      { Returns the value of y after truncation          00537500     
5375                      to DecPlaces decimal places }                      00537600     
5376                                                                         00537700     
5377                                                                         00537800     
5378               let   ExpDigits   be   an   implementation-defined   value00537900     
5379               representing  the number of digit-characters written in an00538000     
5380               exponent;                                                 00538100     
5381                                                                         00538200     
5382                                                                         00538300     
5383               let ActWidth be the positive integer defined by:          00538400     
5384                                                                         00538500     
5385                                                                         00538600     
5386                  if TotalWidth >= ExpDigits + 6                         00538700     
5387                    then ActWidth := TotalWidth                          00538800     
5388                    else ActWidth := ExpDigits + 6;                      00538900     
5389                                                                         00539000     
5390                                                                         00539100     
5391               and let the non-negative number eWritten and  the  integer00539200     
5392               ExpValue be defined by:                                   00539300     
5393                                                                         00539400     
5394                                                                         00539500     
5395                  if e = 0.0                                             00539600     
5396                    then begin eWritten := 0.0; ExpValue := 0 end        00539700     
5397                    else                                                 00539800     
5398                    begin                                                00539900     
5399                                                                         00540000     
5400                                                                         00540100     
5401                                                                         00540200     
5402                               DP7185                             PAGE 9100540300     
5403                                                                         00540400     
5404                                                                         00540500     
5405                                                                         00540600     
5406                    eWritten := abs(e);                                  00540700     
5407                    ExpValue := RealSize ( eWritten ) - 1;               00540800     
5408                    eWritten := eWritten / TenPower ( ExpValue ) ;       00540900     
5409                    DecPlaces := ActWidth-ExpDigits-5;                   00541000     
5410                    eWritten := eWritten +                               00541100     
5411                      0.5*TenPower( -DecPlaces );                        00541200     
5412                    if eWritten >= 10.0                                  00541300     
5413                      then                                               00541400     
5414                      begin                                              00541500     
5415                      eWritten := eWritten / 10.0;                       00541600     
5416                      ExpValue := ExpValue + 1                           00541700     
5417                      end;                                               00541800     
5418                    eWritten := Truncate ( eWritten, DecPlaces )         00541900     
5419                    end;                                                 00542000     
5420                                                                         00542100     
5421                                                                         00542200     
5422               then the floating-point representation of the value  of  e00542300     
5423               shall consist of:                                         00542400     
5424                                                                         00542500     
5425                                                                         00542600     
5426                  the sign character,                                    00542700     
5427                    ( '-' if (e < 0) and (eWritten > 0),                 00542800     
5428                    otherwise a space )                                  00542900     
5429                  the leading digit-character of the decimal             00543000     
5430                    representatiion of eWritten,                         00543100     
5431                  the character '.' ,                                    00543200     
5432                  the next DecPlaces digit-characters                    00543300     
5433                    of the decimal representation of eWritten,           00543400     
5434                  an implementation-defined exponent character           00543500     
5435                    (either 'e' or 'E'),                                 00543600     
5436                  the sign of ExpValue                                   00543700     
5437                    ( '-' if ExpValue < 0, otherwise '+' ),              00543800     
5438                  the ExpDigits digit-characters of the decimal          00543900     
5439                    representation of ExpValue                           00544000     
5440                    (with leading zeros if the value requires them).     00544100     
5441                                                                         00544200     
5442                                                                         00544300     
5443               6.9.4.5.2 THE FIXED-POINT REPRESENTATION                  00544400     
5444               ----------------------------------------                  00544500     
5445                                                                         00544600     
5446                                                                         00544700     
5447               Write(f,e:TotalWidth:FracDigits) shall cause a fixed-point00544800     
5448               representation  of  e  to be written.  Assume the function00544900     
5449               IntegerSize described in clause 6.9.4.4, and the functions00545000     
5450               TenPower and Truncate described in clause 6.9.4.5.1;      00545100     
5451                                                                         00545200     
5452                                                                         00545300     
5453               let eWritten be the non-negative number defined by:       00545400     
5454                                                                         00545500     
5455                                                                         00545600     
5456                  if e := 0.0                                            00545700     
5457                    then eWritten := 0.0                                 00545800     
5458                    else                                                 00545900     
5459                                                                         00546000     
5460                                                                         00546100     
5461                                                                         00546200     
5462                               DP7185                             PAGE 9200546300     
5463                                                                         00546400     
5464                                                                         00546500     
5465                                                                         00546600     
5466                    begin                                                00546700     
5467                    eWritten := abs(e);                                  00546800     
5468                    eWritten := eWritten + 0.5                           00546900     
5469                      * TenPower ( - FracDigits );                       00547000     
5470                    eWritten := Truncate ( eWritten, FracDigits )        00547100     
5471                    end;                                                 00547200     
5472                                                                         00547300     
5473                                                                         00547400     
5474               let IntDigits be the positive integer defined by:         00547500     
5475                                                                         00547600     
5476                                                                         00547700     
5477                  if trunc ( eWritten ) = 0                              00547800     
5478                    then IntDigits := 1                                  00547900     
5479                    else IntDigits:= IntegerSize ( trunc(eWritten) );    00548000     
5480                                                                         00548100     
5481                                                                         00548200     
5482               and let MinNumChars be the positive integer defined by:   00548300     
5483                                                                         00548400     
5484                                                                         00548500     
5485                  MinNumChars := IntDigits + FracDigits + 1;             00548600     
5486                     if (e < 0.0) an (eWritten > 0)                      00548700     
5487                       then MinNumChars := MinNumChars + 1;              00548800     
5488                         {'-' required}                                  00548900     
5489                                                                         00549000     
5490                                                                         00549100     
5491               then the fixed-point representation  of  the  value  of  e00549200     
5492               shall consist of:                                         00549300     
5493                                                                         00549400     
5494                                                                         00549500     
5495                  if TotalWidth >= MinNumChars,                          00549600     
5496                    (TotalWidth - MinNumChars) spaces,                   00549700     
5497                  the character '-' if (e < 0) and (eWritten > 0),       00549800     
5498                  the first IntDigits digit-characters of the decimal    00549900     
5499                    representation                                       00550000     
5500                    of the value of eWritten,                            00550100     
5501                  the character '.',                                     00550200     
5502                  the next FracDigits digit-characters of the decimal    00550300     
5503                    representation                                       00550400     
5504                    of the value of eWritten.                            00550500     
5505                                                                         00550600     
5506                                                                         00550700     
5507               NOTE:  At least MinNumChars characters  are  written.   If00550800     
5508               TotalWidth  is less than this value, no initial spaces are00550900     
5509               written.                                                  00551000     
5510                                                                         00551100     
5511                                                                         00551200     
5512                                                                         00551300     
5513                                                                         00551400     
5514                                                                         00551500     
5515                                                                         00551600     
5516                                                                         00551700     
5517                                                                         00551800     
5518                                                                         00551900     
5519                                                                         00552000     
5520                                                                         00552100     
5521                                                                         00552200     
5522                               DP7185                             PAGE 9300552300     
5523                                                                         00552400     
5524                                                                         00552500     
5525                                                                         00552600     
5526            6.9.4.6 BOOLEAN-TYPE                                         00552700     
5527            --------------------                                         00552800     
5528                                                                         00552900     
5529                                                                         00553000     
5530            If e is of Boolean-type, a representation of the word true or00553100     
5531            the  word  false  (as appropriate to the value of e) shall be00553200     
5532            written on the file f.  This shall be equivalent  to  writing00553300     
5533            the  appropriate  character-strings  'True'  or  'False' (see00553400     
5534            6.9.4.7),   where   the    case    of    each    letter    is00553500     
5535            implementation-defined,   with  a  field-width  parameter  of00553600     
5536            TotalWidth.                                                  00553700     
5537                                                                         00553800     
5538                                                                         00553900     
5539            6.9.4.7 STRING-TYPES                                         00554000     
5540            --------------------                                         00554100     
5541                                                                         00554200     
5542                                                                         00554300     
5543            If the type of e is a  string-type  with  n  components,  the00554400     
5544            default  value  of TotalWidth shall be n.  The representation00554500     
5545            shall consist of:                                            00554600     
5546                                                                         00554700     
5547                                                                         00554800     
5548               if TotalWidth > n,                                        00554900     
5549                  (TotalWidth - n) spaces,                               00555000     
5550                  the first through nth characters of the value          00555100     
5551                  of e in that order.                                    00555200     
5552                                                                         00555300     
5553                if 1 <= TotalWidth <= n,                                 00555400     
5554                  the first through TotalWidthth characters              00555500     
5555                  in that order.                                         00555600     
5556                                                                         00555700     
5557                                                                         00555800     
5558                                                                         00555900     
5559                                                                         00556000     
5560         6.9.5 THE PROCEDURE WRITELN                                     00556100     
5561         ---------------------------                                     00556200     
5562                                                                         00556300     
5563                                                                         00556400     
5564         The syntax of the parameter list of writeln shall be:           00556500     
5565                                                                         00556600     
5566                                                                         00556700     
5567            writeln-parameter-list =                                     00556800     
5568               ["(" (file-variable | write-parameter)                    00556900     
5569               {"," write-parameter}")"] .                               00557000     
5570                                                                         00557100     
5571                                                                         00557200     
5572         Writeln  shall  only  be   applied   to   textfiles.    If   the00557300     
5573         file-variable  or  the  writeln-parameter-list  is  omitted, the00557400     
5574         procedure shall be applied to the required textfile output.     00557500     
5575                                                                         00557600     
5576                                                                         00557700     
5577         writeln(f,p1,...,pn) shall be equivalent to                     00557800     
5578                                                                         00557900     
5579                                                                         00558000     
5580                                                                         00558100     
5581                                                                         00558200     
5582                               DP7185                             PAGE 9400558300     
5583                                                                         00558400     
5584                                                                         00558500     
5585                                                                         00558600     
5586                                                                         00558700     
5587                        begin write(f,p1,...,pn);  writeln(f) end        00558800     
5588                                                                         00558900     
5589                                                                         00559000     
5590         Writeln shall be defined by a pre-assertion and a post-assertion00559100     
5591         using the notation of 6.6.5.2.                                  00559200     
5592                                                                         00559300     
5593                                                                         00559400     
5594         pre-assertion:  (f0 is not undefined) and (f0.M = Generation).  00559500     
5595         post-assertion: (f.L = (f0.L~S(e)) and                          00559600     
5596                          (f^ is totally undefined) and                  00559700     
5597                          (f.R = S()) and (f.M = Generation),            00559800     
5598                          where S(e) is the sequence consisting solely of00559900     
5599                          the end-of-line component defined in 6.4.3.5.  00560000     
5600                                                                         00560100     
5601                                                                         00560200     
5602         NOTE: Writeln(f) terminates the partial line, if any,  which  is00560300     
5603         being generated. By the conventions of 6.6.5.2 it is an error if00560400     
5604         the pre-assertion is not true prior to writeln(f).              00560500     
5605                                                                         00560600     
5606                                                                         00560700     
5607                                                                         00560800     
5608                                                                         00560900     
5609         6.9.6 THE PROCEDURE PAGE                                        00561000     
5610         ------------------------                                        00561100     
5611                                                                         00561200     
5612                                                                         00561300     
5613         It  shall  be  an  error  if  the  pre-assertion  required   for00561400     
5614         writeln(f) (see 6.9.5) does not hold prior to the activation  of00561500     
5615         page(f). If the actual-parameter-list is omitted  the  procedure00561600     
5616         shall be applied to the required textfile output.  Page(f) shall00561700     
5617         cause an implementation-defined effect on the textfile  f,  such00561800     
5618         that  subsequent  text written to f will be on a new page if the00561900     
5619         textfile is printed on  a  suitable  device,  shall  perform  an00562000     
5620         implicit  writeln(f)  if f.L is not empty and if f.L.last is not00562100     
5621         the end-of-line component (see 6.4.3.5),  and  shall  cause  the00562200     
5622         buffer-variable  f^  to become totally-undefined.  The effect of00562300     
5623         inspecting a textfile to which the page  procedure  was  applied00562400     
5624         during generation shall be implementation-dependent.            00562500     
5625                                                                         00562600     
5626                                                                         00562700     
5627                                                                         00562800     
5628                                                                         00562900     
5629                                                                         00563000     
5630                                                                         00563100     
5631                                                                         00563200     
5632                                                                         00563300     
5633                                                                         00563400     
5634                                                                         00563500     
5635                                                                         00563600     
5636                                                                         00563700     
5637                                                                         00563800     
5638                                                                         00563900     
5639                                                                         00564000     
5640                                                                         00564100     
5641                                                                         00564200     
5642                               DP7185                             PAGE 9500564300     
5643                                                                         00564400     
5644                                                                         00564500     
5645                                                                         00564600     
5646      6.10 PROGRAMS                                                      00564700     
5647      -------------                                                      00564800     
5648                                                                         00564900     
5649                                                                         00565000     
5650        program = program-heading ";" program-block "." .                00565100     
5651        program-heading =                                                00565200     
5652              "program" identifier [ "(" program-parameters ")" ] .      00565300     
5653        program-parameters = identifier-list .                           00565400     
5654        program-block = block .                                          00565500     
5655                                                                         00565600     
5656                                                                         00565700     
5657      The identifier of the program-heading shall  be  the  program  name00565800     
5658      which   shall   have  no  significance  within  the  program.   The00565900     
5659      identifiers contained by the program-parameters shall  be  distinct00566000     
5660      and shall be designated program parameters.  Each program parameter00566100     
5661      shall be declared in the variable-declaration-part of the block  of00566200     
5662      the  program-block.   The  binding  of the variables denoted by the00566300     
5663      program parameters to entities external to  the  program  shall  be00566400     
5664      implementation-dependent,   except  if  the  variable  possesses  a00566500     
5665      file-type    in    which    case    the    binding     shall     be00566600     
5666      implementation-defined.                                            00566700     
5667                                                                         00566800     
5668                                                                         00566900     
5669      NOTE:  The external representation of such external entities is not00567000     
5670      defined  by  this standard, nor is any property of a Pascal program00567100     
5671      dependent on such representation.                                  00567200     
5672                                                                         00567300     
5673                                                                         00567400     
5674      The occurrence of the identifier input or the identifier output  as00567500     
5675      a  program  parameter  shall  constitute its defining-point for the00567600     
5676      region that is the program-block as a  variable-identifier  of  the00567700     
5677      required  type  denoted by text.  Such occurrence of the identifier00567800     
5678      input shall cause the post-assertions of  reset  to  hold,  and  on00567900     
5679      output,  the post-assertions of rewrite to hold, prior to the first00568000     
5680      access to the textfile  or  its  associated  buffer-variable.   The00568100     
5681      effect  of  the  application of the required procedure reset or the00568200     
5682      required procedure rewrite to either of these  textfiles  shall  be00568300     
5683      implementation-defined.                                            00568400     
5684                                                                         00568500     
5685                                                                         00568600     
5686      Examples:                                                          00568700     
5687                                                                         00568800     
5688                                                                         00568900     
5689        program copy(f,g);                                               00569000     
5690        var f,g: file of real;                                           00569100     
5691        begin reset(f); rewrite(g);                                      00569200     
5692              while not eof(f) do                                        00569300     
5693                 begin g^ := f^; get(f); put(g)                          00569400     
5694                 end                                                     00569500     
5695        end.                                                             00569600     
5696                                                                         00569700     
5697                                                                         00569800     
5698                                                                         00569900     
5699                                                                         00570000     
5700                                                                         00570100     
5701                                                                         00570200     
5702                               DP7185                             PAGE 9600570300     
5703                                                                         00570400     
5704                                                                         00570500     
5705                                                                         00570600     
5706        program copytext(input,output);                                  00570700     
5707         {This program copies the characters and line structure of the   00570800     
5708         textfile input to the textfile output.}                         00570900     
5709        var ch: char;                                                    00571000     
5710        begin                                                            00571100     
5711           while not eof do                                              00571200     
5712           begin                                                         00571300     
5713              while not eoln do                                          00571400     
5714                 begin read(ch); write(ch)                               00571500     
5715                 end;                                                    00571600     
5716              readln; writeln                                            00571700     
5717           end                                                           00571800     
5718        end.                                                             00571900     
5719                                                                         00572000     
5720                                                                         00572100     
5721        program t6p6p3p3d2revised(output);                               00572200     
5722        var globalone, globaltwo : integer;                              00572300     
5723                                                                         00572400     
5724        procedure dummy;                                                 00572500     
5725          begin                                                          00572600     
5726          writeln('fail4...6.6.3.3-2')                                   00572700     
5727          end { of dummy };                                              00572800     
5728                                                                         00572900     
5729        procedure p(procedure f(procedure ff; procedure gg);             00573000     
5730                    procedure g);                                        00573100     
5731          var localtop : integer;                                        00573200     
5732          procedure r;                                                   00573300     
5733            begin                                                        00573400     
5734            if globalone = 1 then                                        00573500     
5735              begin                                                      00573600     
5736              if (globaltwo <> 2) or (localtop <> 1) then                00573700     
5737                writeln('fail1...6.6.3.3-2')                             00573800     
5738              end                                                        00573900     
5739            else if globalone = 2 then                                   00574000     
5740              begin                                                      00574100     
5741              if (globaltwo <> 2) or (localtop <> 2) then                00574200     
5742                writeln('fail2...6.6.3.3-2')                             00574300     
5743              else                                                       00574400     
5744                writeln('pass...6.6.3.3-2')                              00574500     
5745              end                                                        00574600     
5746            else                                                         00574700     
5747              writeln('fail3...6.6.3.3-2');                              00574800     
5748            globalone := globalone + 1                                   00574900     
5749            end { of r };                                                00575000     
5750          begin { of p }                                                 00575100     
5751          globaltwo := globaltwo + 1;                                    00575200     
5752          localtop := globaltwo;                                         00575300     
5753          if globaltwo = 1 then                                          00575400     
5754            p(f,r)                                                       00575500     
5755          else                                                           00575600     
5756            f(g,r)                                                       00575700     
5757          end { of p};                                                   00575800     
5758                                                                         00575900     
5759                                                                         00576000     
5760                                                                         00576100     
5761                                                                         00576200     
5762                               DP7185                             PAGE 9700576300     
5763                                                                         00576400     
5764                                                                         00576500     
5765                                                                         00576600     
5766        procedure q(procedure f; procedure g);                           00576700     
5767          begin                                                          00576800     
5768          f;                                                             00576900     
5769          g                                                              00577000     
5770          end { of q};                                                   00577100     
5771                                                                         00577200     
5772        begin                                                            00577300     
5773        globalone := 1;                                                  00577400     
5774        globaltwo := 0;                                                  00577500     
5775        p(q,dummy)                                                       00577600     
5776        end.                                                             00577700     
5777                                                                         00577800     
5778                                                                         00577900     
5779                                                                         00578000     
5780      6.11 HARDWARE REPRESENTATION                                       00578100     
5781      ----------------------------                                       00578200     
5782                                                                         00578300     
5783                                                                         00578400     
5784      The representation for lexical tokens and separators given  in  6.100578500     
5785      constitutes  a reference representation for program interchange.  A00578600     
5786      processor shall accept  all  the  reference  symbols  and  all  the00578700     
5787      alternative  symbols  except  for  any  symbol whose representation00578800     
5788      contains a character not available in  the  character  set  of  the00578900     
5789      processor.   The  reference symbols and the alternative symbols are00579000     
5790      given in table 6.                                                  00579100     
5791                                                                         00579200     
5792                                                                         00579300     
5793                         Table 6. Alternative Symbols                    00579400     
5794                         ----------------------------                    00579500     
5795                                                                         00579600     
5796                                                                         00579700     
5797             Reference Symbol    Alternative Symbol                      00579800     
5798             ----------------    -----------------                       00579900     
5799                                                                         00580000     
5800                ^                   @ or ^                               00580100     
5801                {                   (*                                   00580200     
5802                }                   *)                                   00580300     
5803                [                   (.                                   00580400     
5804                ]                   .)                                   00580500     
5805                                                                         00580600     
5806                                                                         00580700     
5807      NOTES:                                                             00580800     
5808                                                                         00580900     
5809                                                                         00581000     
5810      1) The  alternative  comment  delimiters  are  equivalent  to   the00581100     
5811         reference  comment delimiters, thus a comment may begin with "{"00581200     
5812         and close with "*)", or begin with "(*" and close with "}".     00581300     
5813                                                                         00581400     
5814                                                                         00581500     
5815      2) For  any  other   purpose   than   program   interchange,   this00581600     
5816         representation  is  not  required,  and  so does not exclude the00581700     
5817         existence of other alternative symbols.                         00581800     
5818                                                                         00581900     
5819                                                                         00582000     
5820                                                                         00582100     
5821                                                                         00582200     
5822                                                                         00582300     
5823                               DP7185                             PAGE 9800582400     
5824                                                                         00582500     
5825                                                                         00582600     
5826                                                                         00582700     
5827                        APPENDIX A. COLLECTED SYNTAX                     00582800     
5828                        ----------------------------                     00582900     
5829                                                                         00583000     
5830                                                                         00583100     
5831                                                                         00583200     
5832   actual-parameter = expression | variable-access |                     00583300     
5833                      procedure-identifier |                             00583400     
5834                      function-identifier .                              00583500     
5835                                                                         00583600     
5836   actual-parameter-list =                                               00583700     
5837        "(" actual-parameter { "," actual-parameter } ")" .              00583800     
5838                                                                         00583900     
5839   adding-operator = "+" | "-" | "or" .                                  00584000     
5840                                                                         00584100     
5841   apostrophe-image = "''" .                                             00584200     
5842                                                                         00584300     
5843   array-type = "array" "[" index-type { "," index-type } "]"            00584400     
5844                "of" component-type .                                    00584500     
5845                                                                         00584600     
5846   array-variable = variable-access .                                    00584700     
5847                                                                         00584800     
5848   assignment-statement =                                                00584900     
5849        ( variable-access | function-identifier ) ":=" expression .      00585000     
5850                                                                         00585100     
5851   base-type = ordinal-type .                                            00585200     
5852                                                                         00585300     
5853   block = label-declaration-part                                        00585400     
5854             constant-definition-part                                    00585500     
5855               type-definition-part                                      00585600     
5856                 variable-declaration-part                               00585700     
5857                   procedure-and-function-declaration-part               00585800     
5858                     statement-part.                                     00585900     
5859                                                                         00586000     
5860   Boolean-expression = expression .                                     00586100     
5861                                                                         00586200     
5862   bound-identifier = identifier .                                       00586300     
5863                                                                         00586400     
5864   buffer-variable = file-variable "^" .                                 00586500     
5865                                                                         00586600     
5866   case-constant = constant .                                            00586700     
5867                                                                         00586800     
5868   case-constant-list = case-constant { "," case-constant } .            00586900     
5869                                                                         00587000     
5870   case-index = expression .                                             00587100     
5871                                                                         00587200     
5872   case-list-element = case-constant-list ":" statement .                00587300     
5873                                                                         00587400     
5874   case-statement =                                                      00587500     
5875        "case" case-index "of"                                           00587600     
5876        case-list-element {";" case-list-element } [";"} "end" .         00587700     
5877                                                                         00587800     
5878   character-string = "'" string-element                                 00587900     
5879        {string-element} "'" .                                           00588000     
5880                                                                         00588100     
5881                                                                         00588200     
5882                                                                         00588300     
5883                               DP7185                             PAGE 9900588400     
5884                                                                         00588500     
5885                                                                         00588600     
5886                                                                         00588700     
5887   component-type = type-denoter .                                       00588800     
5888                                                                         00588900     
5889   component-variable = indexed-variable | field-designator .            00589000     
5890                                                                         00589100     
5891   compound-statement = "begin" statement-sequence "end" .               00589200     
5892                                                                         00589300     
5893   conditional-statement = if-statement | case-statement .               00589400     
5894                                                                         00589500     
5895   conformant-array-parameter-specification =                            00589600     
5896        "var" identifier-list ":" conformant-array-schema .              00589700     
5897                                                                         00589800     
5898   conformant-array-schema =                                             00589900     
5899        (packed-conformant-array-schema |                                00590000     
5900        unpacked-conformant-array-schema) .                              00590100     
5901                                                                         00590200     
5902   constant = [sign] (unsigned-number | constant-identifier)             00590300     
5903              | character-string                                         00590400     
5904                                                                         00590500     
5905   constant-definition = identifier "=" constant .                       00590600     
5906                                                                         00590700     
5907   constant-definition-part = ["const" constant-definition ";"           00590800     
5908                                {constant-definition ";"}] .             00590900     
5909                                                                         00591000     
5910   constant-identifier = identifier .                                    00591100     
5911                                                                         00591200     
5912   control-variable = entire-variable .                                  00591300     
5913                                                                         00591400     
5914   digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9" .                     00591500     
5915                                                                         00591600     
5916   digit-sequence = digit {digit} .                                      00591700     
5917                                                                         00591800     
5918   directive = letter {letter | digit} .                                 00591900     
5919                                                                         00592000     
5920   domain-type = type-identifier .                                       00592100     
5921                                                                         00592200     
5922   else-part = "else" statement .                                        00592300     
5923                                                                         00592400     
5924   empty-statement = .                                                   00592500     
5925                                                                         00592600     
5926   entire-variable = variable-identifier .                               00592700     
5927                                                                         00592800     
5928   enumerated-type = "(" identifier-list ")" .                           00592900     
5929                                                                         00593000     
5930   expression =                                                          00593100     
5931       simple-expression [ relational-operator simple-expression ] .     00593200     
5932                                                                         00593300     
5933   factor = variable-access | unsigned-constant | bound-identifier |     00593400     
5934            function-designator | set-constructor |                      00593500     
5935            "(" expression ")" | "not" factor .                          00593600     
5936                                                                         00593700     
5937   field-designator = record-variable "." field-specifier |              00593800     
5938        field-designator-identifier .                                    00593900     
5939                                                                         00594000     
5940   field-identifier = identifier .                                       00594100     
5941                                                                         00594200     
5942                                                                         00594300     
5943                               DP7185                            PAGE 10000594400     
5944                                                                         00594500     
5945                                                                         00594600     
5946                                                                         00594700     
5947   field-list =  [ (fixed-part [ ";" variant-part ] |                    00594800     
5948        variant-part) [";"] ] .                                          00594900     
5949                                                                         00595000     
5950   field-specifier = field-identifier .                                  00595100     
5951                                                                         00595200     
5952   file-type = "file" "of" component-type .                              00595300     
5953                                                                         00595400     
5954   file-variable = variable-access .                                     00595500     
5955                                                                         00595600     
5956   final-value = expression .                                            00595700     
5957                                                                         00595800     
5958   fixed-part = record-section { ";" record-section } .                  00595900     
5959                                                                         00596000     
5960   for-statement = "for" control-variable ":=" initial-value             00596100     
5961        ( "to" | "downto" ) final-value "do" statement .                 00596200     
5962                                                                         00596300     
5963   formal-parameter-list =                                               00596400     
5964        "(" formal-parameter-section                                     00596500     
5965        {";" formal-parameter-section} ")" .                             00596600     
5966                                                                         00596700     
5967   formal-parameter-section =                                            00596800     
5968        value-parameter-specification |                                  00596900     
5969        variable-parameter-specification |                               00597000     
5970        procedural-parameter-specification |                             00597100     
5971        functional-parameter-specification |                             00597200     
5972        conformant-array-parameter-specification .                       00597300     
5973                                                                         00597400     
5974   function-block = block .                                              00597500     
5975                                                                         00597600     
5976   function-declaration =                                                00597700     
5977        function-heading ";" directive |                                 00597800     
5978        function-identification ";" function-block |                     00597900     
5979        function-heading ";" function-block .                            00598000     
5980                                                                         00598100     
5981   function-designator = function-identifier                             00598200     
5982                          [ actual-parameter-list ] .                    00598300     
5983                                                                         00598400     
5984   function-heading =                                                    00598500     
5985        "function" identifier [formal-parameter-list]                    00598600     
5986        ":" result-type .                                                00598700     
5987                                                                         00598800     
5988   function-identification =                                             00598900     
5989        "function" function-identifier .                                 00599000     
5990                                                                         00599100     
5991   function-identifier = identifier .                                    00599200     
5992                                                                         00599300     
5993   functional-parameter-specification =                                  00599400     
5994        function-heading .                                               00599500     
5995                                                                         00599600     
5996                                                                         00599700     
5997                                                                         00599800     
5998                                                                         00599900     
5999                                                                         00600000     
6000                                                                         00600100     
6001                                                                         00600200     
6002                                                                         00600300     
6003                               DP7185                            PAGE 10100600400     
6004                                                                         00600500     
6005                                                                         00600600     
6006                                                                         00600700     
6007   goto-statement = "goto" label .                                       00600800     
6008                                                                         00600900     
6009   identified-variable = pointer-variable "^" .                          00601000     
6010                                                                         00601100     
6011   identifier = letter {letter | digit} .                                00601200     
6012                                                                         00601300     
6013   identifier-list = identifier { "," identifier } .                     00601400     
6014                                                                         00601500     
6015   if-statement = "if" Boolean-expression "then" statement               00601600     
6016                   [ else-part ] .                                       00601700     
6017                                                                         00601800     
6018   index-expression = expression .                                       00601900     
6019                                                                         00602000     
6020   index-type = ordinal-type .                                           00602100     
6021                                                                         00602200     
6022   index-type-specification =                                            00602300     
6023        identifier ".." identifier                                       00602400     
6024        ":" ordinal-type-identifier .                                    00602500     
6025                                                                         00602600     
6026   indexed-variable =                                                    00602700     
6027        array-variable "[" index-expression                              00602800     
6028        { "," index-expression } "]" .                                   00602900     
6029                                                                         00603000     
6030   initial-value = expression .                                          00603100     
6031                                                                         00603200     
6032   label = digit-sequence .                                              00603300     
6033                                                                         00603400     
6034   label-declaration-part = ["label" label {"," label} ";"] .            00603500     
6035                                                                         00603600     
6036   letter = "a"|"b"|"c"|"d"|"e"|"f"|"g"|"h"|"i"|"j"|"k"|"l"|"m"|         00603700     
6037            "n"|"o"|"p"|"q"|"r"|"s"|"t"|"u"|"v"|"w"|"x"|"y"|"z .         00603800     
6038                                                                         00603900     
6039   member-designator = expression [ ".." expression ] .                  00604000     
6040                                                                         00604100     
6041   multiplying-operator = "*" | "/" | "div" | "mod" | "and" .            00604200     
6042                                                                         00604300     
6043   new-ordinal-type = enumerated-type | subrange-type .                  00604400     
6044                                                                         00604500     
6045   new-pointer-type = "^" domain-type .                                  00604600     
6046                                                                         00604700     
6047   new-structured-type = ["packed"] unpacked-structured-type .           00604800     
6048                                                                         00604900     
6049   new-type = new-ordinal-type | new-structured-type |                   00605000     
6050              new-pointer-type .                                         00605100     
6051                                                                         00605200     
6052   ordinal-type = new-ordinal-type |                                     00605300     
6053                  integer-type | Boolean-type | char-type |              00605400     
6054                  ordinal-type-identifier .                              00605500     
6055                                                                         00605600     
6056   ordinal-type-identifier = identifier .                                00605700     
6057                                                                         00605800     
6058   packed-conformant-array-schema =                                      00605900     
6059        "packed" "array" "[" index-type-specification                    00606000     
6060                                                                         00606100     
6061                                                                         00606200     
6062                                                                         00606300     
6063                               DP7185                            PAGE 10200606400     
6064                                                                         00606500     
6065                                                                         00606600     
6066                                                                         00606700     
6067        "]" "of" type-identifier .                                       00606800     
6068                                                                         00606900     
6069   pointer-type = new-pointer-type | pointer-type-identifier .           00607000     
6070                                                                         00607100     
6071   pointer-type-identifier = type-identifier .                           00607200     
6072                                                                         00607300     
6073   pointer-variable = variable-access .                                  00607400     
6074                                                                         00607500     
6075   procedural-parameter-specification =                                  00607600     
6076        procedure-heading .                                              00607700     
6077                                                                         00607800     
6078   procedure-and-function-declaration-part =                             00607900     
6079        {(procedure-declaration | function-declaration) ";"} .           00608000     
6080                                                                         00608100     
6081   procedure-block = block .                                             00608200     
6082                                                                         00608300     
6083   procedure-declaration =                                               00608400     
6084        procedure-heading ";" directive |                                00608500     
6085        procedure-identification ";" procedure-block |                   00608600     
6086        procedure-heading ";" procedure-block .                          00608700     
6087                                                                         00608800     
6088   procedure-heading =                                                   00608900     
6089        "procedure" identifier [ formal-parameter-list ] .               00609000     
6090                                                                         00609100     
6091   procedure identification =                                            00609200     
6092        "procedure" procedure-identifier .                               00609300     
6093                                                                         00609400     
6094   procedure-identifier = identifier .                                   00609500     
6095                                                                         00609600     
6096   procedure-statement = procedure-identifier                            00609700     
6097        [ actual-parameter-list ] .                                      00609800     
6098                                                                         00609900     
6099   program = program-heading ";" program-block "." .                     00610000     
6100                                                                         00610100     
6101   program-block = block .                                               00610200     
6102                                                                         00610300     
6103   program-heading =                                                     00610400     
6104        "program" identifier [ "(" program-parameters ")" ] .            00610500     
6105                                                                         00610600     
6106   program-parameters = identifier-list .                                00610700     
6107                                                                         00610800     
6108   read-parameter-list =                                                 00610900     
6109        "("[file-variable ","] variable-access                           00611000     
6110        {"," variable-access}")" .                                       00611100     
6111                                                                         00611200     
6112   readln-parameter-list =                                               00611300     
6113        ["(" (file-variable | variable-access)                           00611400     
6114        {"," variable-access} ")"] .                                     00611500     
6115                                                                         00611600     
6116   record-section = identifier-list ":" type-denoter .                   00611700     
6117                                                                         00611800     
6118   record-type = "record" field-list  "end" .                            00611900     
6119                                                                         00612000     
6120                                                                         00612100     
6121                                                                         00612200     
6122                                                                         00612300     
6123                               DP7185                            PAGE 10300612400     
6124                                                                         00612500     
6125                                                                         00612600     
6126                                                                         00612700     
6127   record-variable = variable-access .                                   00612800     
6128                                                                         00612900     
6129   record-variable-list =                                                00613000     
6130        record-variable { "," record-variable } .                        00613100     
6131                                                                         00613200     
6132   relational-operator =                                                 00613300     
6133        "=" | "<>" | "<" | ">" | "<=" | ">=" | "in" .                    00613400     
6134                                                                         00613500     
6135   repeat-statement = "repeat" statement-sequence                        00613600     
6136        "until" Boolean-expression .                                     00613700     
6137                                                                         00613800     
6138   repetitive-statement = repeat-statement |                             00613900     
6139        while-statement | for-statement .                                00614000     
6140                                                                         00614100     
6141   result-type = simple-type-identifier |                                00614200     
6142        pointer-type-identifier .                                        00614300     
6143                                                                         00614400     
6144   scale-factor = signed-integer .                                       00614500     
6145                                                                         00614600     
6146   set-constructor = "[" [ member-designator                             00614700     
6147        { "," member-designator } ] "]" .                                00614800     
6148                                                                         00614900     
6149   set-type = "set" "of" base-type .                                     00615000     
6150                                                                         00615100     
6151   sign =  "+" | "-" .                                                   00615200     
6152                                                                         00615300     
6153   signed-integer = [sign] unsigned-integer .                            00615400     
6154                                                                         00615500     
6155   signed-number = signed-integer | signed-real .                        00615600     
6156                                                                         00615700     
6157   signed-real = [sign] unsigned-real .                                  00615800     
6158                                                                         00615900     
6159   simple-expression = [ sign ] term { adding-operator term } .          00616000     
6160                                                                         00616100     
6161   simple-statement =                                                    00616200     
6162        empty-statement | assignment-statement |                         00616300     
6163        procedure-statement | goto-statement .                           00616400     
6164                                                                         00616500     
6165   simple-type = ordinal-type | real-type .                              00616600     
6166                                                                         00616700     
6167   simple-type-identifier = type-identifier .                            00616800     
6168                                                                         00616900     
6169   special-symbol = "+"|"-"|"*"|"/"|"="|"<"|">"|"["|"]"|                 00617000     
6170                    "."|","|":"|";"|"^"|"("|")"|                         00617100     
6171                    "<>"|"<="|">="|":="|".."| word-symbol .              00617200     
6172                                                                         00617300     
6173   statement = [ label ":" ] ( simple-statement |                        00617400     
6174        structured-statement ) .                                         00617500     
6175                                                                         00617600     
6176   statement-part = compound-statement .                                 00617700     
6177                                                                         00617800     
6178   statement-sequence = statement { ";" statement } .                    00617900     
6179                                                                         00618000     
6180                                                                         00618100     
6181                                                                         00618200     
6182                                                                         00618300     
6183                               DP7185                            PAGE 10400618400     
6184                                                                         00618500     
6185                                                                         00618600     
6186                                                                         00618700     
6187   string-character =                                                    00618800     
6188        one-of-a-set-of-implementation-defined-characters .              00618900     
6189                                                                         00619000     
6190   string-element = apostrophe-image | string-character .                00619100     
6191                                                                         00619200     
6192   structured-statement =                                                00619300     
6193        compound-statement | conditional-statement |                     00619400     
6194        repetitive-statement | with-statement .                          00619500     
6195                                                                         00619600     
6196   structured-type = new-structured-type |                               00619700     
6197        structured-type-identifier .                                     00619800     
6198                                                                         00619900     
6199   structured-type-identifier = type-identifier .                        00620000     
6200                                                                         00620100     
6201   subrange-type = constant ".." constant .                              00620200     
6202                                                                         00620300     
6203   tag-field = identifier .                                              00620400     
6204                                                                         00620500     
6205   tag-type = ordinal-type-identifier .                                  00620600     
6206                                                                         00620700     
6207   term = factor { multiplying-operator factor } .                       00620800     
6208                                                                         00620900     
6209   type-definition = identifier "=" type-denoter .                       00621000     
6210                                                                         00621100     
6211   type-definition-part = ["type" type-definition ";"                    00621200     
6212        {type-definition ";"}] .                                         00621300     
6213                                                                         00621400     
6214   type-denoter = type-identifier | new-type .                           00621500     
6215                                                                         00621600     
6216   type-identifier = identifier .                                        00621700     
6217                                                                         00621800     
6218   unpacked-conformant-array-schema =                                    00621900     
6219        "array" "[" index-type-specification                             00622000     
6220        { ";" index-type-specification } "]" "of"                        00622100     
6221        (type-identifier | conformant-array-schema) .                    00622200     
6222                                                                         00622300     
6223   unpacked-structured-type = array-type | record-type | set-type |      00622400     
6224        file-type .                                                      00622500     
6225                                                                         00622600     
6226   unsigned-constant = unsigned-number | character-string |              00622700     
6227        constant-identifier | "nil" .                                    00622800     
6228                                                                         00622900     
6229   unsigned-integer = digit-sequence .                                   00623000     
6230                                                                         00623100     
6231   unsigned-number = unsigned-integer | unsigned-real .                  00623200     
6232                                                                         00623300     
6233   unsigned-real =                                                       00623400     
6234        unsigned-integer "." digit-sequence ["e" scale-factor] |         00623500     
6235        unsigned-integer "e" scale-factor .                              00623600     
6236                                                                         00623700     
6237   value-parameter-specification =                                       00623800     
6238        identifier-list ":" type-identifier .                            00623900     
6239                                                                         00624000     
6240                                                                         00624100     
6241                                                                         00624200     
6242                                                                         00624300     
6243                               DP7185                            PAGE 10500624400     
6244                                                                         00624500     
6245                                                                         00624600     
6246                                                                         00624700     
6247   variable-access = entire-variable | component-variable |              00624800     
6248        identified-variable | buffer-variable .                          00624900     
6249                                                                         00625000     
6250   variable-declaration = identifier-list ":" type-denoter .             00625100     
6251                                                                         00625200     
6252   variable-declaration-part = ["var" variable-declaration ";"           00625300     
6253        {variable-declaration ";"}] .                                    00625400     
6254                                                                         00625500     
6255   variable-identifier = identifier .                                    00625600     
6256                                                                         00625700     
6257   variable-parameter-specification =                                    00625800     
6258        "var" identifier-list ":" type-identifier                        00625900     
6259                                                                         00626000     
6260   variant = case-constant-list ":" "("  field-list ")" .                00626100     
6261                                                                         00626200     
6262   variant-part = "case" variant-selector "of"                           00626300     
6263        variant { ";" variant } .                                        00626400     
6264                                                                         00626500     
6265   variant-selector = [tag-field ":"] tag-type .                         00626600     
6266                                                                         00626700     
6267   while-statement = "while" Boolean-expression "do" statement .         00626800     
6268                                                                         00626900     
6269   with-statement =                                                      00627000     
6270        "with" record-variable-list "do"                                 00627100     
6271        statement .                                                      00627200     
6272                                                                         00627300     
6273   word-symbol = "and"|"array"|"begin"|"case"|"const"|"div"|             00627400     
6274                 "do"|"downto"|"else"|"end"|"file"|"for"|                00627500     
6275                 "function"|"goto"|"if"|"in"|"label"|"mod"|              00627600     
6276                 "nil"|"not"|"of"|"or"|"packed"|"procedure"|             00627700     
6277                 "program"|"record"|"repeat"|"set"|"then"|               00627800     
6278                 "to"|"type"|"until"|"var"|"while"|"with" .              00627900     
6279                                                                         00628000     
6280   write-parameter =                                                     00628100     
6281        expression [":" expression [":" expression ] ] .                 00628200     
6282                                                                         00628300     
6283   write-parameter-list =                                                00628400     
6284        "("[file-variable ","] write-parameter                           00628500     
6285        {"," write-parameter]")" .                                       00628600     
6286                                                                         00628700     
6287   writeln-parameter-list =                                              00628800     
6288        ["(" (file-variable | write-parameter)                           00628900     
6289        {"," write-parameter}")"] .                                      00629000     
6290                                                                         00629100     
6291                                                                         00629200     
6292                                                                         00629300     
6293                                                                         00629400     
6294                                                                         00629500     
6295                                                                         00629600     
6296                                                                         00629700     
6297                                                                         00629800     
6298                                                                         00629900     
6299                                                                         00630000     
6300                                                                         00630100     
6301                                                                         00630200     
6302                                                                         00630300     
6303                               DP7185                            PAGE 10600630400     
6304                                                                         00630500     
6305                                                                         00630600     
6306                                                                         00630700     
6307                             APPENDIX B. INDEX                           00630800     
6308                             -----------------                           00630900     
6309                                                                         00631000     
6310                                                                         00631100     
6311                                                                         00631200     
6312   access                        6.5.1      6.5.3.1    6.5.3.3           00631300     
6313                                 6.5.5      6.6.3.3    6.6.3.7           00631400     
6314                                 6.6.5.2    6.8.2.2    6.8.3.10          00631500     
6315                                 6.10                                    00631600     
6316   actual                        6.5.1      6.6.3.3    6.6.3.4           00631700     
6317                                 6.6.3.5    6.7.3      6.8.2.3           00631800     
6318   actual-parameter              6.6.3.2    6.6.3.3    6.6.3.4           00631900     
6319                                 6.6.3.5    6.6.3.7    6.6.5.3           00632000     
6320                                 6.7.3                                   00632100     
6321   actual-parameter-list         6.6.6.5    6.7.3      6.8.2.3           00632200     
6322                                 6.9.6                                   00632300     
6323   array-type                    6.4.3.1    6.4.3.2    6.5.3.2           00632400     
6324                                 6.6.3.7    6.6.3.8                      00632500     
6325   array-variable                6.5.3.2                                 00632600     
6326   assigning-reference           6.5.1      6.5.3.1    6.8.3.9           00632700     
6327   assignment-compatible         6.4.6      6.5.3.2    6.6.3.2           00632800     
6328                                 6.6.5.2    6.6.5.4    6.8.2.2           00632900     
6329                                 6.8.3.9    6.9.2                        00633000     
6330   assignment-statement          6.5.1      6.6.2      6.6.5.3           00633100     
6331                                 6.8.2.1    6.8.2.2                      00633200     
6332   base-type                     6.4.3.4    6.4.6      6.7.1             00633300     
6333   base-types                    6.4.5                                   00633400     
6334   block                         6.2.1      6.2.3      6.3               00633500     
6335                                 6.4.1      6.4.2.3    6.5.1             00633600     
6336                                 6.6.1      6.6.2      6.6.3.1           00633700     
6337                                 6.6.3.2    6.6.3.3    6.6.3.4           00633800     
6338                                 6.6.3.5    6.6.3.7    6.8.1             00633900     
6339                                 6.8.2.3    6.8.3.9    6.10              00634000     
6340   body                          6.6.1      6.8.3.8    6.8.3.9           00634100     
6341   boolean-expression            6.7.2.3    6.8.3.4    6.8.3.7           00634200     
6342                                 6.8.3.8                                 00634300     
6343   boolean-type                  6.4.2.1    6.4.2.2    6.7.2.3           00634400     
6344                                 6.7.2.5    6.9.4.2    6.9.4.6           00634500     
6345   buffer-variable               6.5.1      6.5.5      6.6.5.2           00634600     
6346                                 6.9.2      6.9.4      6.9.6             00634700     
6347                                 6.10                                    00634800     
6348   case-constants                6.4.3.3    6.6.5.3    6.8.3.5           00634900     
6349   char-type                     6.1.7      6.4.2.1    6.4.2.2           00635000     
6350                                 6.4.3.2    6.4.3.5    6.5.5             00635100     
6351                                 6.6.6.4    6.9.2      6.9.4.2           00635200     
6352                                 6.9.4.3                                 00635300     
6353   character                     6.4.2.2    6.6.6.4    6.9.2             00635400     
6354                                 6.9.4.3    6.9.4.4    6.9.4.5.1         00635500     
6355                                 6.9.4.5.2  6.11                         00635600     
6356   character-string              6.1.1      6.1.7      6.1.8             00635700     
6357                                 6.3        6.4.3.2    6.7.1             00635800     
6358   closed                        6.1.5      6.1.6      6.4.6             00635900     
6359                                 6.6.3.8    6.7.1      6.7.2.2           00636000     
6360                                                                         00636100     
6361                                                                         00636200     
6362                                                                         00636300     
6363                               DP7185                            PAGE 10700636400     
6364                                                                         00636500     
6365                                                                         00636600     
6366                                                                         00636700     
6367   compatible                    6.4.3.3    6.4.5      6.4.6             00636800     
6368                                 6.4.7      6.6.3.8    6.7.2.5           00636900     
6369                                 6.8.3.9                                 00637000     
6370   component                     6.2.2      6.4.3.1    6.4.3.2           00637100     
6371                                 6.4.3.3    6.4.3.5    6.4.6             00637200     
6372                                 6.5.1      6.5.3.1    6.5.3.2           00637300     
6373                                 6.5.3.3    6.6.2      6.6.3.3           00637400     
6374                                 6.6.3.6    6.6.3.7    6.6.5.2           00637500     
6375                                 6.6.6.5    6.8.2.2    6.8.3.10          00637600     
6376                                 6.9.2      6.9.5      6.9.6             00637700     
6377   component-type                6.4.3.2    6.4.3.5    6.5.5             00637800     
6378                                 6.6.3.7    6.6.3.8                      00637900     
6379   component-variable            6.5.1      6.5.3.1                      00638000     
6380   component-variables           6.5.3                                   00638100     
6381   components                    6.1.7      6.4.3.1    6.4.3.2           00638200     
6382                                 6.4.3.3    6.4.3.5    6.4.5             00638300     
6383                                 6.5.3.3    6.6.5.2    6.8.3.10          00638400     
6384                                 6.9.4.7                                 00638500     
6385   compound-statement            6.2.1      6.8.1      6.8.3.1           00638600     
6386                                 6.8.3.2                                 00638700     
6387   conformant-array-schema       6.6.3.6    6.6.3.7    6.6.3.8           00638800     
6388   congruous                     6.6.3.4    6.6.3.5    6.6.3.6           00638900     
6389   constant                      6.3        6.4.2.4    6.4.3.3           00639000     
6390                                 6.6.2                                   00639100     
6391   corresponding                 6.1.4      6.2.3      6.4.3.3           00639200     
6392                                 6.5.4      6.6.1      6.6.2             00639300     
6393                                 6.6.3.1    6.6.3.3    6.6.3.6           00639400     
6394                                 6.6.3.7    6.6.3.8    6.6.5.2           00639500     
6395                                 6.7.2.2    6.7.3      6.8.2.3           00639600     
6396   defining-point                6.2.1      6.2.2      6.2.3             00639700     
6397                                 6.3        6.4.1      6.4.2.3           00639800     
6398                                 6.4.3.3    6.5.1      6.5.3.3           00639900     
6399                                 6.6.1      6.6.2      6.6.3.1           00640000     
6400                                 6.6.3.4    6.6.3.5    6.6.3.7           00640100     
6401                                 6.8.3.10   6.10                         00640200     
6402   definition                    4.         5.1        6.4.2.4           00640300     
6403                                 6.4.3.5    6.6.3.7                      00640400     
6404   directive                     6.1.4      6.6.1      6.6.2             00640500     
6405   empty-statement               6.8.2.1                                 00640600     
6406   entire-variable               6.5.1      6.5.2      6.8.3.9           00640700     
6407   enumerated-type               6.4.2.1    6.4.2.3                      00640800     
6408   error                         3.         5.1        6.4.6             00640900     
6409                                 6.5.3.3    6.5.4      6.5.5             00641000     
6410                                 6.6.2      6.6.3.8    6.6.5.2           00641100     
6411                                 6.6.5.3    6.6.6.2    6.6.6.3           00641200     
6412                                 6.6.6.4    6.6.6.5    6.7.1             00641300     
6413                                 6.7.2.2    6.8.3.5    6.8.3.9           00641400     
6414                                 6.9.2      6.9.4      6.9.4.2           00641500     
6415                                 6.9.5      6.9.6                        00641600     
6416   expression                    6.5.3.2    6.6.2      6.6.3.2           00641700     
6417                                 6.6.3.7    6.6.5.2    6.6.5.3           00641800     
6418                                 6.6.5.4    6.6.6.2    6.6.6.3           00641900     
6419                                 6.6.6.4    6.6.6.5    6.7.1             00642000     
6420                                                                         00642100     
6421                                                                         00642200     
6422                                                                         00642300     
6423                               DP7185                            PAGE 10800642400     
6424                                                                         00642500     
6425                                                                         00642600     
6426                                                                         00642700     
6427                                 6.7.2.3    6.7.3      6.8.2.2           00642800     
6428                                 6.8.3.5    6.8.3.9    6.9.4             00642900     
6429                                 6.9.4.2                                 00643000     
6430   factor                        6.1.5      6.6.3.7    6.6.5.3           00643100     
6431                                 6.7.1      6.7.2.1                      00643200     
6432   field                         6.4.3.3    6.5.3.3    6.6.3.3           00643300     
6433   field-designator              6.2.2      6.5.3.1    6.5.3.3           00643400     
6434   field-identifier              6.2.2      6.4.3.3    6.5.3.3           00643500     
6435                                 6.8.3.10                                00643600     
6436   file-type                     6.4.3.1    6.4.3.5    6.4.6             00643700     
6437                                 6.5.5      6.10                         00643800     
6438   file-variable                 6.5.5      6.6.5.2    6.6.6.5           00643900     
6439                                 6.9.2      6.9.3      6.9.4             00644000     
6440                                 6.9.5                                   00644100     
6441   for-statement                 6.5.1      6.8.3.6    6.8.3.9           00644200     
6442   formal                        6.2.3      6.6.1      6.6.2             00644300     
6443                                 6.6.3.1    6.6.3.2    6.6.3.3           00644400     
6444                                 6.6.3.4    6.6.3.5    6.6.3.7           00644500     
6445                                 6.7.3      6.8.2.3                      00644600     
6446   formal-parameter-list         6.6.1      6.6.2      6.6.3.1           00644700     
6447                                 6.6.3.4    6.6.3.5    6.6.3.7           00644800     
6448   function                      6.1.2      6.2.3      6.4.3.5           00644900     
6449                                 6.6        6.6.1      6.6.2             00645000     
6450                                 6.6.3.5    6.6.6.3    6.6.6.4           00645100     
6451                                 6.6.6.5    6.7.2.2    6.7.3             00645200     
6452                                 6.8.2.2    6.9.4.4    6.9.4.5.1         00645300     
6453                                 6.9.4.5.2                               00645400     
6454   function-block                6.1.4      6.2.3      6.5.1             00645500     
6455                                 6.6.2      6.6.3.1    6.8.2.2           00645600     
6456   function-declaration          6.1.4      6.2.1      6.6.2             00645700     
6457                                 6.7.3                                   00645800     
6458   function-designator           6.2.3      6.5.1      6.6.2             00645900     
6459                                 6.7.1      6.7.3                        00646000     
6460   function-identifier           6.2.3      6.5.1      6.6.2             00646100     
6461                                 6.6.3.1    6.6.3.5    6.7.3             00646200     
6462                                 6.8.2.2                                 00646300     
6463   functional                    6.6.3.5                                 00646400     
6464   goto-statement                6.8.1      6.8.2.1    6.8.2.4           00646500     
6465                                 6.8.3.1    6.8.3.7    6.8.3.9           00646600     
6466   identifier                    4.         6.1.3      6.2.2             00646700     
6467                                 6.3        6.4.1      6.4.2.1           00646800     
6468                                 6.4.2.3    6.4.3.3    6.5.1             00646900     
6469                                 6.5.2      6.5.3.3    6.6.1             00647000     
6470                                 6.6.2      6.6.3.1    6.6.3.7           00647100     
6471                                 6.8.3.9    6.10                         00647200     
6472   identifier-list               6.4.2.3    6.4.3.3    6.5.1             00647300     
6473                                 6.6.3.1    6.6.3.7    6.10              00647400     
6474   if-statement                  6.8.3.3    6.8.3.4                      00647500     
6475   implementation-defined        3.         5.1        6.1.7             00647600     
6476                                 6.4.2.2    6.6.5.2    6.7.2.2           00647700     
6477                                 6.9.4.2    6.9.4.5.1  6.9.4.6           00647800     
6478                                 6.9.6      6.10                         00647900     
6479   implementation-dependent      3.         5.1        5.2               00648000     
6480                                                                         00648100     
6481                                                                         00648200     
6482                                                                         00648300     
6483                               DP7185                            PAGE 10900648400     
6484                                                                         00648500     
6485                                                                         00648600     
6486                                                                         00648700     
6487                                 6.1.4      6.7.2.1    6.7.3             00648800     
6488                                 6.8.2.2    6.8.2.3    6.9.6             00648900     
6489                                 6.10                                    00649000     
6490   index-type                    6.4.3.2    6.5.3.2    6.6.3.7           00649100     
6491                                 6.6.3.8                                 00649200     
6492   indexed-variable              6.5.3.1    6.5.3.2    6.6.3.7           00649300     
6493   integer-type                  6.1.5      6.3        6.4.2.1           00649400     
6494                                 6.4.2.2    6.4.6      6.6.6.2           00649500     
6495                                 6.6.6.3    6.6.6.4    6.6.6.5           00649600     
6496                                 6.7.2.2    6.7.2.5    6.9.2             00649700     
6497                                 6.9.4.2    6.9.4.4                      00649800     
6498   label                         6.1.2      6.1.6      6.2.1             00649900     
6499                                 6.2.2      6.2.3      6.8.1             00650000     
6500                                 6.8.2.4                                 00650100     
6501   member                        6.4.6      6.7.1      6.7.2.5           00650200     
6502   member-designator             6.7.1                                   00650300     
6503   note                          4.         5.2        6.1               00650400     
6504                                 6.1.4      6.2.3      6.4.2.2           00650500     
6505                                 6.4.3.1    6.4.3.2    6.4.3.3           00650600     
6506                                 6.4.3.4    6.4.3.5    6.4.4.            00650700     
6507                                 6.5.1      6.5.3.2    6.5.3.3           00650800     
6508                                 6.5.4      6.6.3.1    6.6.3.7           00650900     
6509                                 6.6.3.8    6.6.4.1    6.6.5.2           00651000     
6510                                 6.6.5.3    6.7.1      6.7.2.1           00651100     
6511                                 6.7.2.2    6.7.2.5    6.8.1             00651200     
6512                                 6.8.3.4    6.8.3.5    6.9.2             00651300     
6513                                 6.9.3      6.9.4.5.2  6.9.5             00651400     
6514                                 6.10                                    00651500     
6515   number                        6.1.7      6.4.2.2    6.4.2.3           00651600     
6516                                 6.4.3.2    6.4.5      6.6.3.6           00651700     
6517                                 6.6.6.4    6.7.3      6.8.2.3           00651800     
6518                                 6.9.2      6.9.4.4    6.9.4.5           00651900     
6519                                 6.9.4.5.1  6.9.4.5.2                    00652000     
6520   operand                       6.7.2.1    6.7.2.2    6.7.2.5           00652100     
6521   operator                      6.5.1      6.7.1      6.7.2.1           00652200     
6522                                 6.7.2.2    6.7.2.4    6.7.2.5           00652300     
6523                                 6.8.3.5                                 00652400     
6524   ordinal                       6.4.2.1    6.4.2.2    6.4.2.3           00652500     
6525                                 6.6.6.1    6.6.6.4    6.7.2.5           00652600     
6526   ordinal-type                  6.4.2.1    6.4.2.4    6.4.3.2           00652700     
6527                                 6.4.3.3    6.4.3.4    6.6.6.4           00652800     
6528                                 6.7.1      6.7.2.5    6.8.3.5           00652900     
6529                                 6.8.3.9                                 00653000     
6530   parameter                     6.5.1      6.6.1      6.6.3.1           00653100     
6531                                 6.6.3.2    6.6.3.3    6.6.3.4           00653200     
6532                                 6.6.3.5    6.6.3.6    6.6.3.7           00653300     
6533                                 6.6.5.2    6.6.6.2    6.6.6.5           00653400     
6534                                 6.9.2      6.9.3      6.9.4             00653500     
6535                                 6.9.4.6    6.9.5      6.10              00653600     
6536   pointer                       6.4.1      6.5.1      6.7.2.5           00653700     
6537   pointer-type                  6.4.4      6.5.4      6.6.5.3           00653800     
6538   predeclared                   4.         6.6.4.1                      00653900     
6539   predefined                    4.         6.4.1                        00654000     
6540                                                                         00654100     
6541                                                                         00654200     
6542                                                                         00654300     
6543                               DP7185                            PAGE 11000654400     
6544                                                                         00654500     
6545                                                                         00654600     
6546                                                                         00654700     
6547   procedural                    6.6.3.4                                 00654800     
6548   procedure                     6.1.2      6.2.3      6.4.4             00654900     
6549                                 6.5.1      6.5.4      6.6               00655000     
6550                                 6.6.1      6.6.3.4    6.6.3.7           00655100     
6551                                 6.8.2.3    6.9.2      6.9.3             00655200     
6552                                 6.9.4      6.9.5      6.9.6             00655300     
6553                                 6.10                                    00655400     
6554   procedure-block               6.1.4      6.2.3      6.5.1             00655500     
6555                                 6.6.1      6.6.3.1    6.8.2.3           00655600     
6556   procedure-declaration         6.1.4      6.2.1      6.6.1             00655700     
6557                                 6.8.2.3                                 00655800     
6558   procedure-identifier          6.2.3      6.5.1      6.6.1             00655900     
6559                                 6.6.3.1    6.6.3.4    6.7.3             00656000     
6560                                 6.8.2.3                                 00656100     
6561   procedure-statement           6.2.3      6.5.1      6.6.1             00656200     
6562                                 6.8.2.1    6.8.2.3                      00656300     
6563   program-parameters            6.2.1      6.9.1      6.10              00656400     
6564   real-type                     6.1.5      6.3        6.4.2.1           00656500     
6565                                 6.4.2.2    6.4.6      6.6.6.2           00656600     
6566                                 6.6.6.3    6.7.2.2    6.7.2.5           00656700     
6567                                 6.9.2      6.9.4.2    6.9.4.5           00656800     
6568   record-type                   6.2.2      6.4.3.1    6.4.3.3           00656900     
6569                                 6.5.3.3    6.6.5.3    6.8.3.10          00657000     
6570   record-variable               6.2.2      6.4.3.3    6.5.3.3           00657100     
6571                                 6.8.3.10                                00657200     
6572   reference                     6.5.3.1    6.5.3.3    6.5.4             00657300     
6573                                 6.5.5      6.6.3.3    6.6.3.7           00657400     
6574                                 6.8.2.2    6.8.3.10   6.11              00657500     
6575   region                        6.2.1      6.2.2      6.2.3             00657600     
6576                                 6.3        6.4.1      6.4.2.3           00657700     
6577                                 6.4.3.3    6.5.1      6.5.3.3           00657800     
6578                                 6.6.1      6.6.2      6.6.3.1           00657900     
6579                                 6.6.3.7    6.8.3.10   6.10              00658000     
6580   result                        6.6.1      6.6.6.2    6.6.6.3           00658100     
6581                                 6.6.6.4    6.7.2.2    6.7.2.4           00658200     
6582                                 6.7.2.5                                 00658300     
6583   same                          5.2        6.1        6.1.3             00658400     
6584                                 6.1.4      6.1.7      6.2.2             00658500     
6585                                 6.2.3      6.4.1      6.4.2.2           00658600     
6586                                 6.4.2.4    6.4.3.2    6.4.5             00658700     
6587                                 6.4.6      6.4.7      6.5.3.1           00658800     
6588                                 6.5.3.2    6.6.1      6.6.2             00658900     
6589                                 6.6.3.2    6.6.3.3    6.6.3.5           00659000     
6590                                 6.6.3.6    6.6.3.7    6.6.3.8           00659100     
6591                                 6.6.6.2    6.6.6.4    6.7.1             00659200     
6592                                 6.7.2.2    6.7.2.4    6.7.2.5           00659300     
6593                                 6.8.3.5                                 00659400     
6594   scope                         6.2        6.2.2                        00659500     
6595   set-type                      6.4.3.1    6.4.3.4    6.7.1             00659600     
6596                                 6.7.2.5                                 00659700     
6597   statement                     5.1        6.2.1      6.2.3             00659800     
6598                                 6.6.5.4    6.8.1      6.8.2.1           00659900     
6599                                 6.8.3.1    6.8.3.4    6.8.3.5           00660000     
6600                                                                         00660100     
6601                                                                         00660200     
6602                                                                         00660300     
6603                               DP7185                            PAGE 11100660400     
6604                                                                         00660500     
6605                                                                         00660600     
6606                                                                         00660700     
6607                                 6.8.3.8    6.8.3.9    6.8.3.10          00660800     
6608   string-type                   6.1.7      6.4.3.2    6.6.3.7           00660900     
6609                                 6.7.2.5    6.9.4.2    6.9.4.7           00661000     
6610   string-types                  6.4.3.2    6.4.5      6.4.6             00661100     
6611                                 6.7.2.5    6.9.4.7                      00661200     
6612   structured-type               6.4.3.1    6.4.3.5    6.4.6             00661300     
6613                                 6.5.1      6.8.2.2                      00661400     
6614   subrange                      6.4.2.4    6.4.5      6.7.1             00661500     
6615                                 6.9.2                                   00661600     
6616   symbols                       4.         6.7.2.2    6.11              00661700     
6617   tag-field                     6.4.3.3                                 00661800     
6618   textfile                      6.4.3.5    6.5.5      6.6.6.5           00661900     
6619                                 6.9.2      6.9.3      6.9.4             00662000     
6620                                 6.9.4.1    6.9.5      6.9.6             00662100     
6621                                 6.10                                    00662200     
6622   tokens                        4.         6.1        6.1.1             00662300     
6623                                 6.1.2      6.1.8      6.11              00662400     
6624   totally-undefined             6.2.1      6.5.3.3    6.6.5.2           00662500     
6625                                 6.6.5.3    6.8.2.2    6.9.5             00662600     
6626                                 6.9.6                                   00662700     
6627   type-identifier               6.2.2      6.4.1      6.4.4             00662800     
6628                                 6.6.3.1    6.6.3.2    6.6.3.3           00662900     
6629                                 6.6.3.6    6.6.3.7    6.6.3.8           00663000     
6630   undefined                     6.5.3.3    6.5.4      6.6.2             00663100     
6631                                 6.6.5.2    6.6.5.3    6.6.6.5           00663200     
6632                                 6.7.1      6.8.2.2    6.8.3.9           00663300     
6633                                 6.9.2      6.9.4      6.9.5             00663400     
6634   variable                      6.2.3      6.4.1      6.4.3.5           00663500     
6635                                 6.4.4      6.5.1      6.5.3.1           00663600     
6636                                 6.5.3.2    6.5.3.3    6.5.4             00663700     
6637                                 6.5.5      6.6.3.1    6.6.3.2           00663800     
6638                                 6.6.3.3    6.6.3.7    6.6.5.2           00663900     
6639                                 6.6.5.3    6.6.5.4    6.7.1             00664000     
6640                                 6.8.2.2    6.8.3.9    6.8.3.10          00664100     
6641                                 6.9.2      6.10                         00664200     
6642   variable-access               6.5.1      6.5.3.2    6.5.3.3           00664300     
6643                                 6.5.4      6.5.5      6.6.3.3           00664400     
6644                                 6.6.3.7    6.6.5.2    6.6.5.3           00664500     
6645                                 6.7.1      6.7.3      6.8.2.2           00664600     
6646                                 6.9.2      6.9.3                        00664700     
6647   variant                       6.4.3.3    6.5.3.3    6.6.5.3           00664800     
6648   with-statement                6.8.3.1    6.8.3.10                     00664900     
6649   word-symbol                   6.1.2      6.1.3      6.1.4             00665000     
6650                                                                         00665100     
6651                                                                         00665200     
6652                                                                         00665300     
6653                                                                         00665400     
6654                                                                         00665500     
6655                                                                         00665600     
6656                                                                         00665700     
6657                                                                         00665800     
6658                                                                         00665900     
6659                                                                         00666000     
6660                                                                         00666100     
6661                                                                         00666200     
6662                                                                         00666300     
6663                               DP7185                            PAGE 11200666400     
6664                                                                         00666500     
6665                                                                         00666600     
6666                                                                         00666700     
6667                      APPENDIX C. REQUIRED IDENTIFIERS                   00666800     
6668                      --------------------------------                   00666900     
6669                                                                         00667000     
6670                                                                         00667100     
6671                                                                         00667200     
6672                                                                         00667300     
6673   IDENTIFIER               REFERENCE CLAUSE(S)                          00667400     
6674                                                                         00667500     
6675   abs                      6.6.6.2                                      00667600     
6676   arctan                   6.6.6.2                                      00667700     
6677   Boolean                  6.4.2.2                                      00667800     
6678   char                     6.4.2.2                                      00667900     
6679   chr                      6.6.6.4                                      00668000     
6680   cos                      6.6.6.2                                      00668100     
6681   dispose                  6.6.5.3                                      00668200     
6682   eof                      6.6.6.5                                      00668300     
6683   eoln                     6.6.6.5                                      00668400     
6684   exp                      6.6.6.2                                      00668500     
6685   false                    6.4.2.2                                      00668600     
6686   get                      6.6.5.2                                      00668700     
6687   input                    6.10                                         00668800     
6688   integer                  6.4.2.2                                      00668900     
6689   ln                       6.6.6.2                                      00669000     
6690   maxint                   6.7.2.2                                      00669100     
6691   new                      6.6.5.3                                      00669200     
6692   odd                      6.6.6.5                                      00669300     
6693   ord                      6.6.6.4                                      00669400     
6694   output                   6.10                                         00669500     
6695   pack                     6.6.5.4                                      00669600     
6696   page                     6.9.6                                        00669700     
6697   pred                     6.6.6.4                                      00669800     
6698   put                      6.6.5.2                                      00669900     
6699   read                     6.6.5.2, 6.9.2                               00670000     
6700   readln                   6.9.3                                        00670100     
6701   real                     6.4.2.2                                      00670200     
6702   reset                    6.6.5.2                                      00670300     
6703   rewrite                  6.6.5.2                                      00670400     
6704   round                    6.6.6.3                                      00670500     
6705   sin                      6.6.6.2                                      00670600     
6706   sqr                      6.6.6.2                                      00670700     
6707   sqrt                     6.6.6.2                                      00670800     
6708   succ                     6.6.6.4                                      00670900     
6709   text                     6.4.3.5                                      00671000     
6710   true                     6.4.2.2                                      00671100     
6711   trunc                    6.6.6.3                                      00671200     
6712   unpack                   6.6.5.4                                      00671300     
6713   write                    6.6.5.2, 6.9.4.1,                            00671400     
6714                            6.9.4.2                                      00671500     
6715   writeln                  6.9.5                                        00671600     