Check-in [1e427356ad]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Latest changes for the 5th version of the Pascal-P compiler -- pascal-p5
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1e427356ada83b096c01cd4a35cec6c7040425e9
User & Date: tonypdmtr 2018-01-06 18:44:49
Context
2018-01-06
18:52
Compressed all EXE files and all Linux executables with UPX. Copied newer version of EXE in root directory (pcom.exe & pint.exe) Leaf check-in: 3efa80355e user: tonypdmtr tags: trunk
18:44
Latest changes for the 5th version of the Pascal-P compiler -- pascal-p5 check-in: 1e427356ad user: tonypdmtr tags: trunk
2016-11-20
22:37
Copied newer version of EXE in root directory (pcom.exe & pint.exe) check-in: 067bd71e00 user: tonypdmtr tags: trunk
Changes

Changes to Makefile.

22
23
24
25
26
27
28

29





30
31
32
33
34
35
36
	find . -name "*.out" -type f -delete
	find . -name "*.lst" -type f -delete
	find . -name "*.obj" -type f -delete
	find . -name "*.sym" -type f -delete
	find . -name "*.int" -type f -delete
	find . -name "*.dif" -type f -delete
	find . -name "*.err" -type f -delete

	find . -name "*.tmp" -type f -delete





	find . -name "prd" -type f -delete
	find . -name "prr" -type f -delete
	find . -name "temp" -type f -delete
	find . -name "tmp" -type f -delete
	find . -name "*~" -type f -delete
	find . -name "temp?" -type f -delete








>

>
>
>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	find . -name "*.out" -type f -delete
	find . -name "*.lst" -type f -delete
	find . -name "*.obj" -type f -delete
	find . -name "*.sym" -type f -delete
	find . -name "*.int" -type f -delete
	find . -name "*.dif" -type f -delete
	find . -name "*.err" -type f -delete
	find . -name "*.ecd" -type f -delete
	find . -name "*.tmp" -type f -delete
	find . -name "*.diflst" -type f -delete
	find . -name "*.ecdlst" -type f -delete
	find . -name "*.nocerr" -type f -delete
	find . -name "*.noerr" -type f -delete
	find . -name "*.norerr" -type f -delete
	find . -name "prd" -type f -delete
	find . -name "prr" -type f -delete
	find . -name "temp" -type f -delete
	find . -name "tmp" -type f -delete
	find . -name "*~" -type f -delete
	find . -name "temp?" -type f -delete

Deleted The_Programming_Language_Pascal_1973.pdf.

cannot compute difference between binary files

Changes to bin/flip.exe.

cannot compute difference between binary files

Changes to bin/pcom.exe.

cannot compute difference between binary files

Changes to bin/pint.exe.

cannot compute difference between binary files

Deleted build.

1
2
3
4
5
6
#!/bin/bash
#
# Simply builds the system with whatever compiler is selected.
#
./cpcom
./cpint
<
<
<
<
<
<












Deleted build.bat.

1
2
3
4
5
6
@echo off
rem
rem Simply builds the system with whatever compiler is selected.
rem
call cpcom
call cpint
<
<
<
<
<
<












Deleted compile.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#
# Compile file in batch mode using IP Pascal.
#
# Runs a compile with the input and output coming from/
# going to files.
# 
# Execution:
# 
# Compile <file>
#
# <file> is the filename without extention.
#
# The files are:
#
# <file>.pas - The Pascal source file
# <file>.p5  - The intermediate file produced
# <file>.err - The errors output from the compiler
#
# Note that the l+ option must be specified to get a full
# listing in the .err file (or just a lack of l-).
#

if [ -z "$1" ]
then
   echo "*** Error: Missing parameter"
   exit 1
fi

if [ ! -f $1.pas ]
then
   echo "*** Error: Missing $1.pas file"
   exit 1
fi

./pcom $1.p5 < $1.pas > $1.err
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Deleted compile.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
rem
rem Compile file in batch mode using IP Pascal.
rem
rem Runs a compile with the input and output coming from/
rem going to files.
rem 
rem Execution:
rem 
rem Compile <file>
rem
rem <file> is the filename without extention.
rem
rem The files are:
rem
rem <file>.pas - The Pascal source file
rem <file>.p5  - The intermediate file produced
rem <file>.err - The errors output from the compiler
rem
rem Note that the l+ option must be specified to get a full
rem listing in the .err file (or just a lack of l-).
rem

rem
rem Check there is a parameter
rem
if not "%1"=="" goto paramok
echo *** Error: Missing parameter
goto stop
:paramok

rem
rem Check the source file exists
rem
if exist "%1.pas" goto fileexists
echo *** Error: Missing %1.pas file
goto stop
:fileexists

rem
rem Run the compile
rem
pcom %1.p5 < %1.pas > %1.err

rem
rem Set the error status of the compile
rem
rem This will be zero if the compile was sucessful
rem
grep "Errors in program: 0" %1.err > %1.tmp
rem echo Error return after compile: %errorlevel%
if errorlevel 1 (

    rem
    rem For failed compiles, remove the intermediate file
    rem so it can't be run.
    rem
    echo Compile fails, examine the %1.err file
    del %1.p5

)
rem del %1.tmp

rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted cpcom.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Compile pcom using IP Pascal
#
# *** This script does not work, use the .bat file.
# There is a problem with getting command parameters from Bash.
#

if [ ! -f pcom.pas ]
then
   echo "*** Error: Missing pcom.pas file"
   exit 1
fi

echo
echo Compiling pcom.pas to create pcom.exe
echo
echo pc pcom /standard /nrf /r
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted cpcom.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
rem
rem Compile pcom using IP Pascal
rem

if exist "pcom.pas" goto fileexists
echo *** Error: Missing pcom.pas file
goto stop
:fileexists

echo.
echo Compiling pcom.pas to create pcom.exe
echo.
pc pcom/standard/nrf/r

rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted cpcoms.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Script to run a pcom self compile
#
# First, change elide patterns to #ove prr file statements.
# The modified file goes in pcomm.pas (pcom modified).
#
sed -e 's/{elide}/{/g' -e 's/{noelide}/}/g' pcom.pas > pcomm.pas
#
# Compile pcom to intermediate code using its binary version.
#
echo Compiling pcom to intermediate code
./compile pcomm
cat pcomm.err
#
# Now run that code on the interpreter and have it compile itself
# to intermediate again.
#
echo Running pcom to compile itself
cp pcomm.pas pcomm.inp
./run pcomm
cat pcomm.lst
#
# Now we have the original intermediate from the binary version
# of pcom, and the intermediate generated by the interpreted
# pcom. Compare them for equality. Put the result in pcomm.dif.
#
echo Comparing the intermediate code for the runs
diffnole pcomm.p5 pcomm.out > pcomm.dif
#
# Show the file, so if the length is zero, it compared ok.
#
echo Resulting diff file length should be zero for pass
ls -l pcomm.dif
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted cpcoms.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo off
rem
rem Script to run a pcom self compile
rem
rem First, change elide patterns to remove prr file statements.
rem The modified file goes in pcomm.pas (pcom modified).
rem
sed -e 's/{elide}/{/g' -e 's/{noelide}/}/g' pcom.pas > pcomm.pas
rem
rem Compile pcom to intermediate code using its binary version.
rem
echo Compiling pcom to intermediate code
call compile pcomm
type pcomm.err
rem
rem Now run that code on the interpreter and have it compile itself
rem to intermediate again.
rem
echo Running pcom to compile itself
cp pcomm.pas pcomm.inp
call run pcomm
type pcomm.lst
rem
rem Now we have the original intermediate from the binary version
rem of pcom, and the intermediate generated by the interpreted
rem pcom. Compare them for equality. Put the result in pcomm.dif.
rem
echo Comparing the intermediate code for the runs
call diffnole pcomm.p5 pcomm.out > pcomm.dif
rem
rem Show the file, so if the length is zero, it compared ok.
rem
echo Resulting diff file length should be zero for pass
dir pcomm.dif
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted cpint.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Compile pint using IP Pascal
#
# This script does not work, use the .bat file.
# There is a problem with getting command parameters from Bash.
#

if [ ! -f pint.pas ]
then
   echo "*** Error: Missing pint.pas file"
   exit 1
fi

echo
echo Compiling pint.pas to create pint.exe
echo
pc pint/standard/nrf/r
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted cpint.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
rem
rem Compile pcom using IP Pascal
rem

if exist "pcom.pas" goto fileexists
echo *** Error: Missing pcom.pas file
goto stop
:fileexists

echo.
echo Compiling pint.pas to create pint.exe
echo.
pc pint/standard/nrf/r

rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted cpints.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# Script to run a pint self compile
#
# First, change elide patterns to #ove prd and prr file statements.
# The modified file goes in pintm.pas (pint modified).
#
sed -e 's/{elide}/{/g' -e 's/{noelide}/}/g' -e 's/{remove//g' -e 's/remove}//g' pint.pas > pintm.pas
#
# Compile the final target, the PAT
#
echo Compiling the ISO 7185 PAT
./compile standard_tests/iso7185pat
cat standard_tests/iso7185pat.err
#
# Compile pint itself
#
echo Compiling pint to intermediate code
./compile pintm
cat pintm.err
#
# Add the final target program (the pat) to the end of pint.
# This means that the version of pint will read and interpret
# this.
#
cat pintm.p5 standard_tests/iso7185pat.p5 > tmp.p5
rm pintm.p5
mv tmp.p5 pintm.p5
#
# Now run pint on pint, which runs the PAT.
#
echo Running pint on itself, to run the ISO 7185 PAT
./run pintm
cp pintm.lst standard_tests/iso7185pats.lst
echo Comparing PAT result to reference
diffnole standard_tests/iso7185pats.lst standard_tests/iso7185pats.cmp > standard_tests/iso7185pats.dif
#
# Show the file, so if the length is zero, it compared ok.
#
echo Resulting diff file length should be zero for pass
ls -l standard_tests/iso7185pats.dif
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































Deleted cpints.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
rem
rem Script to run a pint self compile
rem
rem First, change elide patterns to remove prd and prr file statements.
rem The modified file goes in pintm.pas (pint modified).
rem
sed -e 's/{elide}/{/g' -e 's/{noelide}/}/g' -e 's/{remove//g' -e 's/remove}//g' pint.pas > pintm.pas
rem
rem Compile the final target, the PAT
rem
echo Compiling the ISO 7185 PAT
call compile standard_tests\iso7185pat
type standard_tests\iso7185pat.err
rem
rem Compile pint itself
rem
echo Compiling pint to intermediate code
call compile pintm
type pintm.err
rem
rem Add the final target program (the pat) to the end of pint.
rem This means that the version of pint will read and interpret
rem this.
rem
cat pintm.p5 standard_tests\iso7185pat.p5 > tmp.p5
del pintm.p5
ren tmp.p5 pintm.p5
rem
rem Now run pint on pint, which runs the PAT.
rem
echo Running pint on itself, to run the ISO 7185 PAT
call run pintm
cp pintm.lst standard_tests\iso7185pats.lst
echo Comparing PAT result to reference
call diffnole standard_tests\iso7185pats.lst standard_tests\iso7185pats.cmp > standard_tests\iso7185pats.dif
rem
rem Show the file, so if the length is zero, it compared ok.
rem
echo Resulting diff file length should be zero for pass
dir standard_tests\iso7185pats.dif
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































Deleted deoln.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**********************************************************************
*
*                       CONVERT LINE ENDINGS TO DOS FORMAT
*
* Converts line endings to DOS format.
*
*/

#include <stdio.h>

main()

{

    int c;
    int lf = 0;
    int cr = 0;

    while ((c = getchar()) != EOF) {

        if (c == '\n') {

            if (cr) {

                /* Last was lf, this is cr, ignore */
                cr = 0;
                lf = 0;

            } else {

                /* output newline and flag last */
                putchar('\r');
                putchar('\n');
                lf = 1;

            }

         } else if (c == '\r') {

            if (lf) {

                /* last was cr, this is lf, ignore */
                cr = 0;
                lf = 0;
              
            } else {

                /* output newline and flag last */
                putchar('\r');
                putchar('\n');
                cr = 1;

            }

        } else {

            /* output normal character */
            putchar(c);
            cr = 0;
            lf = 0;

        }

    }

}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































Deleted diffnole.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# Difference without line endings
#
# Same as diff, but ignores the DOS/Unix line ending differences.
#

if [ -z "$1" ]
then

   echo "*** Error: Missing parameter 1"
   echo "*** s/b \"diffnole <file1> <file2>\""
   exit 1

fi

if [ -z "$2" ]
then

   echo "*** Error: Missing parameter 2"
   echo "*** s/b \"diffnole <file1> <file2>\""
   exit 1

fi

cp $1 tmp1
cp $2 tmp2
flip -u -b tmp1
flip -u -b tmp2
diff tmp1 tmp2
rm tmp1
rm tmp2
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted diffnole.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off
rem
rem Difference without line endings
rem
rem Same as diff, but ignores the DOS/Unix line ending differences.
rem

if not "%1"=="" goto paramok1
echo *** Error: Missing parameter 1
goto stop
:paramok1

if not "%2"=="" goto paramok2
echo *** Error: Missing parameter 2
goto stop
:paramok2

copy %1 %1.tmp > tmp3
copy %2 %2.tmp > tmp3
flip -u -b %1.tmp
flip -u -b %2.tmp
diff %1.tmp %2.tmp
rm -f %1.tmp
rm -f %2.tmp
rm -f tmp3
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Added doc/~$e_p5_compiler.docx.

cannot compute difference between binary files

Deleted fixeol.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#
# Fix line ending on bash scripts
#
echo
echo Fixing the line endings on Unix files
echo
flip -u compile
flip -u	cpcom
flip -u	cpcoms
flip -u	cpint
flip -u	cpints
flip -u	diffnole
flip -u	regress
flip -u	run
flip -u	configure
flip -u	testprog
flip -u	build
flip -u	gpc/compile
flip -u	gpc/cpcom
flip -u	gpc/cpint
flip -u	gpc/p5
flip -u	gpc/run
flip -u	ip_pascal/compile
flip -u	ip_pascal/cpcom
flip -u	ip_pascal/cpint
flip -u	ip_pascal/p5
flip -u	ip_pascal/run
flip -u mac_flip_script
flip -u make_flip
echo
echo Fixing the line enddings on DOS/Windows files
echo
flip -m compile.bat
flip -m	cpcom.bat
flip -m	cpcoms.bat
flip -m	cpint.bat
flip -m	cpints.bat
flip -m	diffnole.bat
flip -m	regress.bat
flip -m	run.bat
flip -m	configure.bat
flip -m	testprog.bat
flip -u	build.bat
flip -m	gpc/compile.bat
flip -m	gpc/cpcom.bat
flip -m	gpc/cpint.bat
flip -m	gpc/p5.bat
flip -m	gpc/run.bat
flip -m	ip_pascal/compile.bat
flip -m	ip_pascal/cpcom.bat
flip -m	ip_pascal/cpint.bat
flip -m	ip_pascal/p5.bat
flip -m	ip_pascal/run.bat
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































Deleted fixeol.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
rem
rem Fix line endings
rem 
echo.
echo Fixing the line endings on Unix files.
echo.
flip -u compile
flip -u	cpcom
flip -u	cpcoms
flip -u	cpint
flip -u	cpints
flip -u	diffnole
flip -u	regress
flip -u	run
flip -u	configure
flip -u	testprog
flip -u	build
flip -u unixeol
flip -u	gpc\compile
flip -u	gpc\cpcom
flip -u	gpc\cpint
flip -u	gpc\p5
flip -u	gpc\run
flip -u	ip_pascal\compile
flip -u	ip_pascal\cpcom
flip -u	ip_pascal\cpint
flip -u	ip_pascal\p5
flip -u	ip_pascal\run
flip -u mac_flip_script
flip -u make_flip
echo.
echo Fixing the line endings on DOS/Windows files.
echo.
flip -m compile.bat
flip -m	cpcom.bat
flip -m	cpcoms.bat
flip -m	cpint.bat
flip -m	cpints.bat
flip -m	diffnole.bat
flip -m	regress.bat
flip -m	run.bat
flip -m	configure.bat
flip -m	testprog.bat
flip -u	build.bat
flip -m	gpc\compile.bat
flip -m	gpc\cpcom.bat
flip -m	gpc\cpint.bat
flip -m	gpc\p5.bat
flip -m	gpc\run.bat
flip -m	ip_pascal\compile.bat
flip -m	ip_pascal\cpcom.bat
flip -m	ip_pascal\cpint.bat
flip -m	ip_pascal\p5.bat
flip -m	ip_pascal\run.bat
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted gpc/cpcom.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# Compile pcom using GPC
#
# Note that GPC generates several unecessary warnings during
# the compile, including use of compiler directives in comments
# (in ISO 7185 mode it should just ignore them), and that it
# is generating 256 element sets by default (there does not
# seem to be any way to shut up this warning, including using the
# --setlimit option).
#

if [ ! -f pcom.pas ]
then
   echo "*** Error: Missing pcom.pas file"
   exit 1
fi

echo
echo Compiling pcom.pas to create pcom.exe
echo
gpc -o pcom pcom.pas --classic-pascal-level-0 --no-warnings --transparent-file-names --no-range-checking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted gpc/cpcom.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@echo off
rem
rem Compile pcom using GPC
rem
rem Note that GPC generates several unecessary warnings during
rem the compile, including use of compiler directives in comments
rem (in ISO 7185 mode it should just ignore them), and that it
rem is generating 256 element sets by default (there does not
rem seem to be any way to shut up this warning, including using the
rem --setlimit option).
rem
echo.
echo Compiling pcom.pas to create pcom.exe
echo.
gpc -o pcom pcom.pas --classic-pascal-level-0 --no-warnings --transparent-file-names --no-range-checking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted gpc/cpint.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# Compile pint using GPC
#
# Note that GPC generates several unecessary warnings during
# the compile, including use of compiler directives in comments
# (in ISO 7185 mode it should just ignore them), and that it
# is generating 256 element sets by default (there does not
# seem to be any way to shut up this warning, including using the
# --setlimit option).
#

if [ ! -f pint.pas ]
then
   echo "*** Error: Missing pint.pas file"
   exit 1
fi

echo
echo Compiling pint.pas to create pint.exe
echo
gpc -o pint pint.pas --classic-pascal-level-0 --no-warnings --transparent-file-names --no-range-checking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted gpc/cpint.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@echo off
rem
rem Compile pint using GPC
rem
rem Note that GPC generates several unecessary warnings during
rem the compile, including use of compiler directives in comments
rem (in ISO 7185 mode it should just ignore them), and that it
rem is generating 256 element sets by default (there does not
rem seem to be any way to shut up this warning, including using the
rem --setlimit option).
rem
echo.
echo Compiling pint.pas to create pint.exe
echo.
gpc -o pint pint.pas --classic-pascal-level-0 --no-warnings --transparent-file-names --no-range-checking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Changes to gpc/windows_X86/pcom.exe.

cannot compute difference between binary files

Changes to gpc/windows_X86/pint.exe.

cannot compute difference between binary files

Deleted ip_pascal/cpcom.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Compile pcom using IP Pascal
#
# *** This script does not work, use the .bat file.
# There is a problem with getting command parameters from Bash.
#

if [ ! -f pcom.pas ]
then
   echo "*** Error: Missing pcom.pas file"
   exit 1
fi

echo
echo Compiling pcom.pas to create pcom.exe
echo
echo pc pcom /standard /nrf /r
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted ip_pascal/cpcom.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
rem
rem Compile pcom using IP Pascal
rem

if exist "pcom.pas" goto fileexists
echo *** Error: Missing pcom.pas file
goto stop
:fileexists

echo.
echo Compiling pcom.pas to create pcom.exe
echo.
pc pcom/standard/nrf/r

rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted ip_pascal/cpint.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Compile pint using IP Pascal
#
# This script does not work, use the .bat file.
# There is a problem with getting command parameters from Bash.
#

if [ ! -f pint.pas ]
then
   echo "*** Error: Missing pint.pas file"
   exit 1
fi

echo
echo Compiling pint.pas to create pint.exe
echo
pc pint/standard/nrf/r
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted ip_pascal/cpint.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
rem
rem Compile pcom using IP Pascal
rem

if exist "pcom.pas" goto fileexists
echo *** Error: Missing pcom.pas file
goto stop
:fileexists

echo.
echo Compiling pint.pas to create pint.exe
echo.
pc pint/standard/nrf/r

rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Changes to ip_pascal/windows_X86/pcom.exe.

cannot compute difference between binary files

Changes to ip_pascal/windows_X86/pint.exe.

cannot compute difference between binary files

Deleted iso7185.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
   <meta name="Author" content="Scott A. Moore">
   <title>ANSI-ISO PASCAL</title>
</head>
<body text="#000000" bgcolor="#66FFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000" background="graphpaper.gif">

<center>
    <h1>ISO 7185 Standard</h1>
</center>

<hr>
<p align="left">This copy of the standard is unofficial, but believed to represent 
an accurate current copy of the ISO 7185 standard with a modified introduction. 
The introduction was changed, in a humorous manner, apparently to emphasise the 
point that this is not meant to be an official copy.</p>
<p align="left">As much as possible, the formatting of the original document 
has been kept in this HTML document. However, the page headers and footers have 
been removed, and in some cases changes were required because of differences 
between HTML formatting principles and the original formatting.</p>
<p align="left">The original copy of this document was received as a PDF (Portable 
Document Format) represented as direct bitmap scans of the original. This was 
run through an optical character recognition program which created the character 
codes for the text and created a &quot;coordinated&quot; PDF containing both 
the original image and the selectable text overlaid one atop the other. From 
this extracted text this HTML document was created. The optical character recognition 
is not perfect, and there may in fact be several recognition errors within this 
document.</p>
<p align="left">The table of contents that appears next was not part of the original standard, 
and I have added that. Note that the way the standard is structured, the points 
don't always have subjects, and may have no content. I have simply placed and 
referenced each of the points of the document as content indexes.</p>
<p align="left">The embedded indexes, where possible, have been linked to their 
bookmarks. Note that in one case, such a link leads nowhere in the original 
standard, see the reference to 6.6.4.1. This was left unlinked. It refers to 
a missing index in the standard:</p>
<p align="left">6.6.4.1 General. The required procedures shall be ...</p>
<p align="left">This existed in the ANSI/IEEE770X3.97-1983 standard, and was 
left out of the ISO 7185 standard. It wasn't important, but was  apparently 
deleted without also deleting references to it.</p>
<p align="left">One of the advantages of HTML formatting is color. The optional 
sections of the standard, dealing with conformant array parameters, was placed 
in <font color="red">red color text</font>. This is your indication that this 
may or may not exist in your implementation. Note that with the red sections 
removed, the ISO 7185 standard is almost identical to the original&nbsp;ANSI/IEEE770X3.97-1983 
standard, now discontinued. The color red has no particular import, it was choosen 
because it shows up well against the blue background.</p>
<hr>
<h2 align="center">Table of contents</h2>
<h3><a href="#Acknowledgements">Acknowledgements</a></h3><h3><a href="#Introduction">Introduction</a></h3><h3><a href="#Language history">Language history</a></h3><h3><a href="#Project history">Project history</a></h3>
<h3><a href="#1 Scope">1 Scope</a></h3>
<ul>
<h3><a href="#1.1">1.1</a></h3>
<h3><a href="#1.2">1.2</a></h3>
</ul>
<h3><a href="#2 Normative reference">2 Normative reference</a></h3>
<h3><a href="#3 Definitions">3 Definitions</a></h3>
<ul>
<h3><a href="#3.1 Error">3.1 Error</a></h3>
<h3><a href="#3.2 Extension">3.2 Extension</a></h3>
<h3><a href="#3.3 Implementation-defined">3.3 Implementation-defined</a></h3>
<h3><a href="#3.4 Implementation-dependent">3.4 Implementation-dependent</a></h3>
<h3><a href="#3.5 Processor">3.5 Processor</a></h3>
</ul>
<h3><a href="#4 Definitional conventions">4 Definitional conventions</a></h3>
<h3><a href="#5 Compliance">5 Compliance</a></h3>
<ul>
<h3><a href="#5.1 Processors">5.1 Processors</a></h3>
<h3><a href="#5.2 Programs">5.2 Programs</a></h3>
</ul>
<h3><a href="#6 Requirements">6 Requirements</a></h3>
<ul>
<h3><a href="#6.1 Lexical tokens">6.1 Lexical tokens</a></h3>
    <ul>
<h3><a href="#6.1.1 General">6.1.1 General</a></h3><h3><a href="#6.1.2 Special-symbols">6.1.2 Special-symbols</a></h3><h3><a href="#6.1.3 Identifiers">6.1.3 Identifiers</a></h3><h3><a href="#6.1.4 Directives">6.1.4 Directives</a></h3><h3><a href="#6.1.5 Numbers">6.1.5 Numbers</a></h3><h3><a href="#6.1.6 Labels">6.1.6 Labels</a></h3><h3><a href="#6.1.7 Character-strings">6.1.7 Character-strings</a></h3><h3><a href="#6.1.8 Token separators">6.1.8 Token separators</a></h3><h3><a href="#6.1.9 Lexical alternatives">6.1.9 Lexical alternatives</a></h3>
    </ul>
<h3><a href="#6.2 Blocks, scopes, and activations">6.2 Blocks, scopes, and activations</a></h3>
    <ul>
<h3><a href="#6.2.1 Blocks">6.2.1 Blocks</a></h3><h3><a href="#6.2.2 Scopes">6.2.2 Scopes</a></h3>
        <ul>
<h3><a href="#6.2.2.1">6.2.2.1</a></h3>
<h3><a href="#6.2.2.2">6.2.2.2</a></h3>
<h3><a href="#6.2.2.3">6.2.2.3</a></h3>
<h3><a href="#6.2.2.4">6.2.2.4</a></h3>
<h3><a href="#6.2.2.5">6.2.2.5</a></h3>
<h3><a href="#6.2.2.6">6.2.2.6</a></h3>
<h3><a href="#6.2.2.7">6.2.2.7</a></h3>
<h3><a href="#6.2.2.8">6.2.2.8</a></h3>
<h3><a href="#6.2.2.9">6.2.2.9</a></h3>
<h3><a href="#6.2.2.10">6.2.2.10</a></h3>
<h3><a href="#6.2.2.11">6.2.2.11</a></h3>
        </ul>
<h3><a href="#6.2.3 Activations">6.2.3 Activations</a></h3>
        <ul>
<h3><a href="#6.2.3.1">6.2.3.1</a></h3>
<h3><a href="#6.2.3.2">6.2.3.2</a></h3>
<h3><a href="#6.2.3.3">6.2.3.3</a></h3>
<h3><a href="#6.2.3.4">6.2.3.4</a></h3>
<h3><a href="#6.2.3.5">6.2.3.5</a></h3>
        </ul>
    </ul>
<h3><a href="#6.3 Constant-definitions">6.3 Constant-definitions</a></h3>
<h3><a href="#6.4 Type-definitions">6.4 Type-definitions</a></h3>
    <ul>
<h3><a href="#6.4.1 General">6.4.1 General</a></h3><h3><a href="#6.4.2 Simple-types">6.4.2 Simple-types</a></h3>
        <ul>
<h3><a href="#6.4.2.1 General">6.4.2.1 General</a></h3>
<h3><a href="#6.4.2.2 Required simple-types">6.4.2.2 Required simple-types</a></h3>
<h3><a href="#6.4.2.3 Enumerated-types">6.4.2.3 Enumerated-types</a></h3>
<h3><a href="#6.4.2.4 Subrange-types">6.4.2.4 Subrange-types</a></h3>
        </ul>
<h3><a href="#6.4.3 Structured-types">6.4.3 Structured-types</a></h3>
        <ul>
<h3><a href="#6.4.3.1 General">6.4.3.1 General</a></h3>
<h3><a href="#6.4.3.2 Array-types">6.4.3.2 Array-types</a></h3>
<h3><a href="#6.4.3.3 Record-types">6.4.3.3 Record-types</a></h3>
<h3><a href="#6.4.3.4 Set-types">6.4.3.4 Set-types</a></h3>
<h3><a href="#6.4.3.5 File-types">6.4.3.5 File-types</a></h3>
        </ul>
<h3><a href="#6.4.4 Pointer-types">6.4.4 Pointer-types</a></h3><h3><a href="#6.4.5 Compatible types">6.4.5 Compatible types</a></h3><h3><a href="#6.4.6 Assignment-compatibility">6.4.6 Assignment-compatibility</a></h3><h3><a href="#6.4.7 Example of a type-definition-part">6.4.7 Example of a type-definition-part</a></h3>
    </ul>
<h3><a href="#6.5 Declarations and denotations of variables">6.5 Declarations and denotations of variables</a></h3>
    <ul>
<h3><a href="#6.5.1 Variable-declarations">6.5.1 Variable-declarations</a></h3><h3><a href="#6.5.2 Entire-variables">6.5.2 Entire-variables</a></h3><h3><a href="#6.5.3 Component-variables">6.5.3 Component-variables</a></h3>
        <ul>
<h3><a href="#6.5.3.1 General">6.5.3.1 General</a></h3>
<h3><a href="#6.5.3.2 Indexed-variables">6.5.3.2 Indexed-variables</a></h3>
<h3><a href="#6.5.3.3 Field-designators">6.5.3.3 Field-designators</a></h3>
        </ul>
<h3><a href="#6.5.4 Identified-variables">6.5.4 Identified-variables</a></h3><h3><a href="#6.5.5 Buffer-variables">6.5.5 Buffer-variables</a></h3>
    </ul>
<h3><a href="#6.6 Procedure and function declarations">6.6 Procedure and function declarations</a></h3>
    <ul>
<h3><a href="#6.6.1 Procedure-declarations">6.6.1 Procedure-declarations</a></h3><h3><a href="#6.6.2 Function-declarations">6.6.2 Function-declarations</a></h3><h3><a href="#6.6.3 Parameters">6.6.3 Parameters</a></h3>
        <ul>
<h3><a href="#6.6.3.1 General">6.6.3.1 General</a></h3>
<h3><a href="#6.6.3.2 Value parameters">6.6.3.2 Value parameters</a></h3>
<h3><a href="#6.6.3.3 Variable parameters">6.6.3.3 Variable parameters</a></h3>
<h3><a href="#6.6.3.4 Procedural parameters">6.6.3.4 Procedural parameters</a></h3>
<h3><a href="#6.6.3.5 Functional parameters">6.6.3.5 Functional parameters</a></h3>
<h3><a href="#6.6.3.6 Parameter list congruity">6.6.3.6 Parameter list congruity</a></h3>
<h3><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7 Conformant array parameters</font></a></h3>
            <ul>
<h3><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1 General</font></a></h3>
<h3><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2 Value conformant arrays</font></a></h3>
<h3><a href="#6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3 Variable conformant arrays</font></a></h3>
            </ul>
<h3><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8 Conformability</font></a></h3>
        </ul>
<h3><a href="#6.6.4 Required procedures and functions">6.6.4 Required procedures and functions</a></h3><h3><a href="#6.6.5 Required procedures">6.6.5 Required procedures</a></h3>
        <ul>
<h3><a href="#6.6.5.1 General">6.6.5.1 General</a></h3>
<h3><a href="#6.6.5.2 File handling procedures">6.6.5.2 File handling procedures</a></h3>
<h3><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3 Dynamic allocation procedures</a></h3>
<h3><a href="#6.6.5.4 Transfer procedures">6.6.5.4 Transfer procedures</a></h3>
        </ul>
<h3><a href="#6.6.6 Required functions">6.6.6 Required functions</a></h3>
        <ul>
<h3><a href="#6.6.6.1 General">6.6.6.1 General</a></h3>
<h3><a href="#6.6.6.2 Arithmetic functions">6.6.6.2 Arithmetic functions</a></h3>
<h3><a href="#6.6.6.3 Transfer functions">6.6.6.3 Transfer functions</a></h3>
<h3><a href="#6.6.6.4 Ordinal functions">6.6.6.4 Ordinal functions</a></h3>
<h3><a href="#6.6.6.5 Boolean functions">6.6.6.5 Boolean functions</a></h3>
        </ul>
    </ul>
<h3><a href="#6.7 Expressions">6.7 Expressions</a></h3>
    <ul>
<h3><a href="#6.7.1 General">6.7.1 General</a></h3><h3><a href="#6.7.2 Operators">6.7.2 Operators</a></h3>
        <ul>
<h3><a href="#6.7.2.1 General">6.7.2.1 General</a></h3>
<h3><a href="#6.7.2.2 Arithmetic operators">6.7.2.2 Arithmetic operators</a></h3>
<h3><a href="#6.7.2.3 Boolean operators">6.7.2.3 Boolean operators</a></h3>
<h3><a href="#6.7.2.4 Set operators">6.7.2.4 Set operators</a></h3>
<h3><a href="#6.7.2.5 Relational operators">6.7.2.5 Relational operators</a></h3>
        </ul>
<h3><a href="#6.7.3 Function-designators">6.7.3 Function-designators</a></h3>
    </ul>
<h3><a href="#6.8 Statements">6.8 Statements</a></h3>
    <ul>
<h3><a href="#6.8.1 General">6.8.1 General</a></h3><h3><a href="#6.8.2 Simple-statements">6.8.2 Simple-statements</a></h3>
        <ul>
<h3><a href="#6.8.2.1 General">6.8.2.1 General</a></h3>
<h3><a href="#6.8.2.2 Assignment-statements">6.8.2.2 Assignment-statements</a></h3>
<h3><a href="#6.8.2.3 Procedure-statements">6.8.2.3 Procedure-statements</a></h3>
<h3><a href="#6.8.2.4 Goto-statements">6.8.2.4 Goto-statements</a></h3>
        </ul>
<h3><a href="#6.8.3 Structured-statements">6.8.3 Structured-statements</a></h3>
        <ul>
<h3><a href="#6.8.3.1 General">6.8.3.1 General</a></h3>
<h3><a href="#6.8.3.2 Compound-statements">6.8.3.2 Compound-statements</a></h3>
<h3><a href="#6.8.3.3 Conditional-statements">6.8.3.3 Conditional-statements</a></h3>
<h3><a href="#6.8.3.4 If-statements">6.8.3.4 If-statements</a></h3>
<h3><a href="#6.8.3.5 Case-statements">6.8.3.5 Case-statements</a></h3>
<h3><a href="#6.8.3.6 Repetitive-statements">6.8.3.6 Repetitive-statements</a></h3>
<h3><a href="#6.8.3.7 Repeat-statements">6.8.3.7 Repeat-statements</a></h3>
<h3><a href="#6.8.3.8 While-statements">6.8.3.8 While-statements</a></h3>
<h3><a href="#6.8.3.9 For-statements">6.8.3.9 For-statements</a></h3>
<h3><a href="#6.8.3.10 With-statements">6.8.3.10 With-statements</a></h3>
        </ul>
    </ul>
<h3><a href="#6.9 Input and output">6.9 Input and output</a></h3>
    <ul>
<h3><a href="#6.9.1 The procedure read">6.9.1 The procedure read</a></h3><h3><a href="#6.9.2 The procedure readln">6.9.2 The procedure readln</a></h3><h3><a href="#6.9.3 The procedure write">6.9.3 The procedure write</a></h3>
        <ul>
<h3><a href="#6.9.3.1 Write-parameters">6.9.3.1 Write-parameters</a></h3>
<h3><a href="#6.9.3.2 Char-type">6.9.3.2 Char-type</a></h3>
<h3><a href="#6.9.3.3 Integer-type">6.9.3.3 Integer-type</a></h3>
<h3><a href="#6.9.3.4 Real-type">6.9.3.4 Real-type</a></h3>
            <ul>
<h3><a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1 The floating-point representation</a></h3>
<h3><a href="#6.9.3.4.2 The fixed-point representation">6.9.3.4.2 The fixed-point representation</a></h3>
            </ul>
<h3><a href="#6.9.3.5 Boolean-type">6.9.3.5 Boolean-type</a></h3>
<h3><a href="#6.9.3.6 String-types">6.9.3.6 String-types</a></h3>
        </ul>
<h3><a href="#6.9.4 The procedure writeln">6.9.4 The procedure writeln</a></h3><h3><a href="#6.9.5 The procedure page">6.9.5 The procedure page</a></h3>
    </ul>
<h3><a href="#6.10 Programs">6.10 Programs</a></h3>
</ul>
<h3 align="left"><a href="#Annex A">Annex A: Collected syntax</a></h3>
<h3 align="left"><a href="#Annex B">Annex B: Cross-references</a></h3>
<h3 align="left"><a href="#Annex C">Annex C: Required identifiers</a></h3>
<h3 align="left"><a href="#Annex D">Annex D: Errors</a></h3>
<h3 align="left"><a href="#Annex E">Annex E: Implementation-defined features</a></h3>
<h3 align="left"><a href="#Annex F">Annex F: Implementation-dependent features</a></h3>
<hr WIDTH="100%">
<h2 align="center">Pascal</h2>
<h2 align="center">ISO 7185:1990</h2>
<hr>
<p align="left">This online copy of the unextended Pascal standard is provided only as an 
aid to standardization. In the case of differences between this online version 
and the printed version, the printed version takes precedence.</p>
<p>Do not modify this document. Do not include this document in another software 
product. You may print this document for personal use only. Do not sell this 
document.</p>
<p>Use this information only for good ; never for evil. Do not expose to fire. Do not operate heavy equipment after reading, may cause drowsiness. Do not 
read under the inuence of alcohol (although there have been several unconfirmed 
reports that alcohol actually improves the readability). The standard is written 
in English. If you have trouble understanding a particular section, read it 
again and again and again... Sit up straight. Eat your vegatables. Do not 
mumble.</p>
<p>(C)ISO/IEC 1991</p>
<h3><a name="Acknowledgements">Acknowledgements</a></h3>
<p>The efforts are acknowledged of all those who contributed to the work of 
the BSI and ISO Pascal working groups, and in particular:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Tony Addyman&nbsp;         Harris Hall             John Reagan</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Albrecht Biedl        Carsten Hammer          Mike Rees</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Bob Brewer            Atholl Hay              Arthur Sale</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Coen Bron             Tony Hetherington       Paula Schwartz</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">David Burnett-Hall    Steve Hobbs             Barry Smith</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">David Bustard         Mel Jackson             John Souter</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Barry Byrne           Scott Jameson           Manfred Stadel</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Klaus Daessler        David Jones             Bob Tennent</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Richard De Morgan     David Joslin            Tom Turba</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Norman Diamond        Katsuhiko Kakehi        Eiiti Wada</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Bob Dietrich          Olivier Lecarme         Willem Wakker</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Ken Edwards           Jim Miner               David Watt</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Jacques Farre         Wes Munsil              Jim Welsh</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Bill Findlay          Bill Price              Brian Wichmann</pre>
<p>The efforts are acknowledged of all those who contributed to the work of 
JPC, and in particular:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Michael Alexander      Steven Hobbs           David L. Presberg</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Jeffrey Allen          Albert A. Hoffman      William C. Price</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Ed Barkmeyer           Robert Hutchins        Bruce Ravenal</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">W. Ashby Boaz          Rosa C. Hwang          David L. Reese</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Jack Boudreaux         Scott Jameson          David C. Robbins</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">A. Winsor Brown        David Jones            Lynne Rosenthal</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Jerry R. Brookshire    Steen Jurs             Tom Rudkin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Tomas M. Burger        Mel Kanner             Stephen C. Schwarm</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">David S. Cargo         John Kaufmann          Rick Shaw</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Richard J. Cichelli    Leslie Klein           Carol Sledge</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Joe Cointment          Bruce Knobe            Barry Smith</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Roger Cox              Dennis Kodimer         Rudeen S. Smith</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Jean Danver            Ronald E. Kole         Bill Stackhouse</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Debra Deutsch          Alan A. Kortesoja      Marius Troost</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Bob Dietrich           Edward Krall           Thomas N. Turba</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Victor A. Folwarczny   Robert Lange Prescott  K. Turner</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">G. G. Gustafson        Rainer McCown          Howard Turtle</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Thomas Giventer        Jim Miner              Robert Tuttle</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Hellmut Golde          Eugene N. Miya         Richard C. Vile, Jr</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">David N. Gray          Mark Molloy            Larry B. Weber</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Paul Gregory           William Neuhauser      David Weil</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Michael Hagerty        Dennis Nicholson       Thomas R. Wilcox</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Charles E. Haynes      Mark Overgaard         Thomas Wolfe</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Christopher Henrich    Ted C. Park            Harvey Wohlwend</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Steven Hiebert         Donald D. Peckham      Kenneth M. Zemrowski</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Ruth Higgins           David Peercy</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Charles Hill           Robert C. B. Poon</pre>
<p>(The above list is of people acknowledged in ANSI/IEEE770X3.97-1983.)</p>
<h3><a name="Introduction">Introduction</a></h3>
<p>This International Standard provides an unambiguous and machine independent 
definition of the programming language Pascal. Its purpose is to facilitate 
portability of Pascal programs for use on a wide variety of data processing 
systems.</p>
<h3><a name="Language history">Language history</a></h3>
<p>The computer programming language Pascal was designed by Professor Niklaus 
Wirth to satisfy two principal aims</p>
<ul>
    <p>a) to make available a language suitable for teaching programming as 
    a systematic discipline based on certain fundamental concepts clearly and 
    naturally reected by the language;</p>
    <p>b) to define a language whose implementations could be both reliable 
    and efficient on then available computers.</p>
</ul>
<p>However, it has become apparent that Pascal has attributes that go far beyond 
these original goals. It is now being increasingly used commercially in the 
writing of both system and application software. This International Standard 
is primarily a consequence of the growing commercial interest in Pascal and 
the need to promote the portability of Pascal programs between data processing 
systems.</p>
<p>In drafting this International Standard the continued stability of Pascal 
has been a prime objective. However, apart from changes to clarify the specification, two major changes have been introduced.</p>
<ul>
    <p>a) The syntax used to specify procedural and functional parameters has 
    been changed to require the use of a procedure or function heading, as appropriate 
    (see <b><a href="#6.6.3.1 General">6.6.3.1</a></b>) ; this change was introduced to overcome a language insecurity.</p>
    <p><font color="red">b) A fifth kind of parameter, the conformant-array-parameter, has been 
    introduced (see </font><b><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a></b><font color="red">). With this kind of parameter, the required bounds 
    of the index-type of an actual-parameter are not fixed, but are restricted 
    to a specified range of values.</font></p>
</ul>
<h3><a name="Project history">Project history</a></h3>
<p>In 1977, a working group was formed within the British Standards Institution 
(BSI) to produce a standard for the programming language Pascal. This group 
produced several working drafts, the first draft for public comment being widely 
published early in 1979. In 1978, BSI's proposal that Pascal be added to ISO's 
program of work was accepted, and the ISO Pascal Working Group (then designated 
ISO/TC97/SC5/WG4) was formed in 1979. The Pascal standard was to be published 
by BSI on behalf of ISO, and this British Standard referenced by the International 
Standard.</p>
<p>In the USA, in the fall of 1978, application was made to the IEEE Standards 
Board by the IEEE Computer Society to authorize project 770 (Pascal). After 
approval, the first meeting was held in January 1979.</p>
<p>In December of 1978, X3J9 convened as a result of a SPARC (Standards Planning 
and Requirements Committee) resolution to form a US TAG (Technical Advisory 
Group) for the ISO Pascal standardization effort initiated by the UK. These 
efforts were performed under X3 project 317.</p>
<p>In agreement with IEEE representatives, in February of 1979, an X3 resolution 
combined the X3J9 and P770 committees into a single committee called the Joint 
X3J9/IEEE-P770 Pascal Standards Committee. (Throughout, the term JPC refers 
to this committee.) The first meeting as JPC was held in April 1979.</p>
<p>The resolution to form JPC clarified the dual function of the single joint 
committee to produce a dpANS and a proposed IEEE Pascal standard, identical 
in content.</p>
<p>ANSI/IEEE770X3.97-1983, American National Standard Pascal Computer Programming 
Language, was approved by the IEEE Standards Board on September 17, 1981, and 
by the American National Standards Institute on December 16, 1982. British Standard 
BS6192, Specification for Computer programming language Pascal, was published 
in 1982, and International Standard 7185 (incorporating BS6192 by reference) 
was approved by ISO on December 1, 1983. Differences between the ANSI and ISO 
standards are detailed in the Foreword of ANSI/IEEE770X3.97-1983.</p>
<p>In 1985, the ISO Pascal Working Group (then designated ISO/TC97/SC22/WG2, 
now ISO/IEC JTC1/SC22/WG2) was reconvened after a long break. An Interpretations 
Subgroup was formed, to interpret doubtful or ambiguous portions of the Pascal 
standards. As a result of the work of this subgroup, and also of the work on 
the Extended Pascal standard being produced by WG2 and JPC, BS6192/ISO7185 was 
revised and corrected during 1988/89 ; it is expected that ANSI/IEEE770X3.97-1983 
will be replaced by the revised ISO 7185.</p>
<p>The major revisions to BS6192 :1982 to produce the new ISO 7185 are:</p>
<ul>
    <p>a) resolution of the differences with ANSI/IEEE770X3.97-1983;</p>
    <p>b) relaxation of the syntax of real numbers, to allow &quot;digit sequences&quot; 
    rather than &quot;unsigned integers&quot; for the various components;</p>
    <p>c) in the handling of &quot;end-of-line characters&quot; in text files;</p>
    <p>d) in the handling of run-time errors.</p>
</ul>
<h3>INTERNATIONAL STANDARD ISO/IEC 7185:1990(E)</h3>
<h3>Information technology -- Programming</h3>
<h3>languages -- Pascal</h3>
<h1><a name="1 Scope">1 Scope</a></h1>
<h2><a name="1.1">1.1</a></h2>
<p>This International Standard specifi es the semantics and syntax of the computer 
programming language Pascal by specifying requirements for a processor and for 
a conforming program. Two levels of compliance are defined for both processors 
and programs.</p>
<h2><a name="1.2">1.2</a></h2>
<p>This International Standard does not specify</p>
<ul>
    <p>a) the size or complexity of a program and its data that will exceed 
    the capacity of any specific data processing system or the capacity of a particular processor, nor 
    the actions to be taken when the corresponding limits are exceeded;</p>
    <p>b) the minimal requirements of a data processing system that is capable 
    of supporting an implementation of a processor for Pascal;</p>
    <p>c) the method of activating the program-block or the set of commands 
    used to control the environment in which a Pascal program is transformed 
    and executed;</p>
    <p>d) the mechanism by which programs written in Pascal are transformed 
    for use by a data processing system;</p>
    <p>e) the method for reporting errors or warnings;</p>
    <p>f) the typographical representation of a program published for human 
    reading.</p>
</ul>
<h1><a name="2 Normative reference">2 Normative reference</a></h1>
<p>The following standard contains provisions which, through reference in this 
text, constitute provisions of this International Standard. At the time of publication, 
the edition indicated was valid. All standards are subject to revision, and 
parties to agreements based on this International Standard are encouraged to investigate the possibility of applying the most recent 
edition of the standard listed below. Members of IEC and ISO maintain registers 
of currently valid International Standards.</p>
<p>ISO 646 :1983, Information processing|ISO 7-bit coded character set for information 
interchange.</p>
<h1><a name="3 Definitions">3 Definitions</a></h1>
<p>For the purposes of this International Standard, the following definitions 
apply.</p>
<p>NOTE -- To draw attention to language concepts, some terms are printed in italics 
on their first mention or at their defining occurrence(s) in this International 
Standard.</p>
<h2><a name="3.1 Error">3.1 Error</a></h2>
<p>A violation by a program of the requirements of this International Standard 
that a processor is permitted to leave undetected.</p>
<p>NOTES</p>
<p>1 If it is possible to construct a program in which the violation or non-violation 
of this International Standard requires knowledge of the data read by the program 
or the implementation defi nition of implementationde fined features, then violation 
of that requirement is classified as an error. Processors may report on such 
violations of the requirement without such knowledge, but there always remain 
some cases that require execution, simulated execution, or proof procedures 
with the required knowledge. Requirements that can be verified without such 
knowledge are not classified as errors.</p>
<p>2 Processors should attempt the detection of as many errors as possible, 
and to as complete a degree as possible. Permission to omit detection is provided 
for implementations in which the detection would be an excessive burden.</p>
<h2><a name="3.2 Extension">3.2 Extension</a></h2>
<p>A modification to clause <b><a href="#6 Requirements">6</a></b> of the requirements of this International Standard 
that does not invalidate any program complying with this International Standard, as defined by <b><a href="#5.2 Programs">5.2</a></b>, 
except by prohibiting the use of one or more particular spellings of identifiers (see <b><a href="#6.1.2 Special-symbols">6.1.2</a></b> and 
<b><a href="#6.1.3 Identifiers">6.1.3</a></b>).</p>
<h2><a name="3.3 Implementation-defined">3.3 Implementation-defined</a></h2>
<p>Possibly differing between processors, but defined for any particular processor.</p>
<h2><a name="3.4 Implementation-dependent">3.4 Implementation-dependent</a></h2>
<p>Possibly differing between processors and not necessarily defined for any 
particular processor.</p>
<h2><a name="3.5 Processor">3.5 Processor</a></h2>
<p>A system or mechanism that accepts a program as input, prepares it for execution, 
and executes the process so defined with data to produce results.</p>
<p>NOTE -- A processor may consist of an interpreter, a compiler and run-time 
system, or another mechanism, together with an associated host computing machine and operating system, 
or another mechanism for achieving the same effect. A compiler in itself, for example, does not constitute 
a processor.</p>
<h3 align="center" style="line-height:100%; margin-top:0; margin-bottom:0;">Table 1 -- Metalanguage symbols</h3>
<table border="1" style="line-height:100%; margin-top:0; margin-bottom:0;">
    <tr>
        <td width="416">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Metasymbol</h3>
        </td>
        <td width="416">            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;"> Meaning</h3>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">=</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">Shall be defined to be</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&gt;</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">Shall have as an alternative definition</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">|</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">Alternatively</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">.</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">End of definition</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">[ x ]</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">0 or 1 instance of x</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">{ x }</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">0 or more instances of x</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">( x | y )</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">Grouping : either of x or y</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">'xyz'</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">The terminal symbol xyz</p>
        </td>
    </tr>
    <tr>
        <td width="416">            <p style="line-height:100%; margin-top:0; margin-bottom:0;">meta-identifier</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">A nonterminal symbol</p>
        </td>
    </tr>
</table>
<h1><a name="4 Definitional conventions">4 Definitional conventions</a></h1>
<p>The metalanguage used in this International Standard to specify the syntax 
of the constructs is based on Backus-Naur Form. The notation has been modified from the original 
to permit greater convenience of description and to allow for iterative productions to replace 
recursive ones. Table 1 lists the meanings of the various metasymbols. Further specification of 
the constructs is given by prose and, in some cases, by equivalent program fragments. Any identifier 
that is defined in clause <b><a href="#6 Requirements">6</a></b> as a required identifier shall denote the corresponding required entity 
by its occurrence in such a program fragment. In all other respects, any such program fragment is 
bound by any pertinent requirement of this International Standard.</p>
<p>A meta-identifier shall be a sequence of letters and hyphens beginning with 
a letter.</p>
<p>A sequence of terminal and nonterminal symbols in a production implies the 
concatenation of the text that they ultimately represent. Within <b><a href="#6.1 Lexical tokens">6.1</a></b> this concatenation is direct 
; no characters shall intervene. In all other parts of this International Standard the concatenation 
is in accordance with the rules set out in <b><a href="#6.1 Lexical tokens">6.1</a></b>.</p>
<p>The characters required to form Pascal programs shall be those implicitly 
required to form the tokens and separators defined in <b><a href="#6.1 Lexical tokens">6.1</a></b>.</p>
<p>Use of the words of, in, containing, and closest-containing, when expressing 
a relationship between terminal or nonterminal symbols, shall have the following meanings</p>
<ul>
<p>-- the x of a y: refers to the x occurring directly in a production defining 
y;</p>
<p>-- the x in a y : is synonymous with 'the x of a y';</p>
<p>-- a y containing an x : refers to any y from which an x is directly or indirectly 
derived;</p>
<p>-- the y closest-containing an x : that y containing an x and not containing 
another y containing that x.</p>
</ul>
<p>These syntactic conventions are used in clause <b><a href="#6 Requirements">6</a></b> to specify certain syntactic 
requirements and also the contexts within which certain semantic specifications apply.</p>
<p>In addition to the normal English rules for hyphenation, hyphenation is used 
in this International Standard to form compound words that represent meta-identifiers, semantic 
terms, or both. All meta-identifiers that contain more than one word are written as a unit with 
hyphens joining the parts. Semantic terms ending in \type&quot; and \variable&quot; are also 
written as one hyphenated unit. Semantic terms representing compound ideas are likewise written as hyphenated 
units, e.g., digitvalue, activation-point, assignment-compatible, and identifying-value.</p>
<p>NOTES are included in this International Standard only for purposes of clarification, 
and aid in the use of the standard. NOTES are informative only and are not a part of the 
International Standard.</p>
<p>Examples in this International Standard are equivalent to NOTES.</p>
<h1><a name="5 Compliance"><font color="black">5 Compliance</font></a></h1>
<p><font color="red">There are two levels of compliance, level 0 and level 1. Level 0 does not 
include conformant-arrayparameters. Level 1 does include conformant-array-parameters.</font></p>
<h2><a name="5.1 Processors">5.1 Processors</a></h2>
<p>A processor complying with the requirements of this International Standard 
shall</p>
<ul>
<p><font color="black">a) if it complies at level 0, accept all the features of the language specified 
in clause </font><b><a href="#6 Requirements"><font color="black">6</font></a></b><font color="black">, except for </font><b><a href="#6.6.3.6 Parameter list congruity"><font color="black">6.6.3.6</font></a><font color="black"> e</font></b><font color="black">), </font><b><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a></b><font color="black">, and </font><b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b><font color="black">, with the meanings defined in clause 
</font><b><a href="#6 Requirements"><font color="black">6</font></a></b><font color="black">;</font></p>
<p>b) if it complies at level 1, accept all the features of the language specified 
in clause 6 with the meanings defined in clause <b><a href="#6 Requirements">6</a></b>;</p>
<p>c) not require the inclusion of substitute or additional language elements 
in a program in order to accomplish a feature of the language that is specified in clause <b><a href="#6 Requirements">6</a></b>;</p>
<p>d) be accompanied by a document that provides a definition of all implementation-defined 
features;</p>
<p>e) be able to determine whether or not the program violates any requirements 
of this International Standard, where such a violation is not designated an error, report the result 
of this determination to the user of the processor before the execution of the program-block, if 
any, and shall prevent execution of the program-block, if any;</p>
<p>f) treat each violation that is designated an error in at least one of the 
following ways</p>
    <ul>
<p>1) there shall be a statement in an accompanying document that the error 
is not reported, and a note referencing each such statement shall appear in a separate section 
of the accompanying document;</p>
<p>2) the processor shall report the error or the possibility of the error during 
preparation of the program for execution and in the event of such a report shall be able 
to continue further processing and shall be able to refuse execution of the program-block;</p>
<p>3) the processor shall report the error during execution of the program;</p>
    </ul>
<p>and if an error is reported during execution of the program, the processor 
shall terminate execution ; if an error occurs within a statement, the execution of that 
statement shall not be completed;</p>
</ul>
<ul>
<p>NOTE -- 1 This means that processing will continue up to or beyond execution 
of the program at the option of the user.</p>
<p>g) be accompanied by a document that separately describes any features accepted 
by the processor that are prohibited or not specified in clause 6: such extensions shall 
be described as being 'extensions to Pascal as specified by ISO/IEC 7185';</p>
<p>h) be able to process, in a manner similar to that specified for errors, 
any use of any such extension;</p>
<p>i) be able to process, in a manner similar to that specified for errors, 
any use of an implementation-dependent feature.</p>
</ul>
<p>NOTE -- 2 The phrase 'be able to' is used in <b><a href="#5.1 Processors">5.1</a></b> to permit the implementation 
of a switch with which the user may control the reporting.</p>
<p>A processor that purports to comply, wholly or partially, with the requirements 
of this International Standard shall do so only in the following terms. A compliance statement 
shall be produced by the processor as a consequence of using the processor or shall be included 
in accompanying documentation. If the processor complies in all respects with the requirements 
of this International Standard, the compliance statement shall be</p>
<p>(This processor) complies with the requirements of level (number) of ISO/IEC 
7185.</p>
<p>If the processor complies with some but not all of the requirements of this 
International Standard then it shall not use the above statement, but shall instead use the following 
compliance statement</p>
<p>(This processor) complies with the requirements of level (number) of ISO/IEC 
7185, with the following exceptions : (followed by a reference to, or a complete list of, 
the requirements of the International Standard with which the processor does not comply).</p>
<p>In both cases the text (This processor) shall be replaced by an unambiguous 
name identifying the processor, and the text (number) shall be replaced by the appropriate level 
number.</p>
<p>NOTE -- 3 Processors that do not comply fully with the requirements of the 
International Standard are not required to give full details of their failures to comply in the compliance 
statement ; a brief reference to accompanying documentation that contains a complete list in sufficient 
detail to identify the defects is sufficient.</p>
<h2><a name="5.2 Programs">5.2 Programs</a></h2>
<p>A program conforming with the requirements of this International Standard 
shall</p>
<ul>
<p>a) if it conforms at level 0, use only those features of the language specified 
in clause <b><a href="#6 Requirements">6</a></b>, except for <b><a href="#6.6.3.6 Parameter list congruity">6.6.3.6</a> e</b>), <b><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a></b>, and <b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b>;</p>
<p>b) if it conforms at level 1, use only those features of the language specified 
in clause <b><a href="#6 Requirements">6</a></b>; and</p>
    <p>c) not rely on any particular interpretation of implementation-dependent 
features.</p>
</ul>
<p>NOTES</p>
<p>1 A program that complies with the requirements of this International Standard 
may rely on particular implementation-de fined values or features.</p>
<p>2 The requirements for conforming programs and compliant processors do not 
require that the results produced by a conforming program are always the same when processed by a 
compliant processor. They may be the same, or they may differ, depending on the program. A simple 
program to illustrate this is</p>
<ul>
<pre>program x(output); begin writeln(maxint) end.</pre>
</ul>
<h1><a name="6 Requirements">6 Requirements</a></h1>
<h2><a name="6.1 Lexical tokens">6.1 Lexical tokens</a></h2>
<p>NOTE -- The syntax given in this subclause describes the formation of lexical 
tokens from characters and the separation of these tokens and therefore does not adhere to the same 
rules as the syntax in the rest of this International Standard.</p>
<h3><a name="6.1.1 General">6.1.1 General</a></h3>
<p>The lexical tokens used to construct Pascal programs are classified into 
special-symbols, identifiers, directives, unsigned-numbers, labels, and character-strings. The representation 
of any letter (upper case or lower case, differences of font, etc.) occurring anywhere outside 
of a character-string (see <b><a href="#6.1.7 Character-strings">6.1.7</a></b>) shall be insignificant in that occurrence to the meaning of the program.</p>
<ul>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">letter = 'a' | 'b' | 'c' | 'd' | 'e' |&nbsp;'f' |&nbsp;'g' | 'h' | 'i' | 'j'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">       | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">       | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' .</pre>
</ul>
<h3><a name="6.1.2 Special-symbols">6.1.2 Special-symbols</a></h3>
<p>The special-symbols are tokens having special meanings and are used to delimit 
the syntactic units of the language.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">special-symbol = '+' | '-' | '*' | '/' | '=' | '&lt;' | '&gt;' | '[' | ']'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">               | '.' | ',' | ':' | ';' | '^' | '(' | ')'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">               | '&lt;&gt;' | '&lt;=' | '&gt;=' | ':=' | '..' | word-symbol .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">word-symbol = 'and' | 'array' | 'begin' | 'case' | 'const' | 'div'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">            |'do' | 'downto' | 'else' | 'end' | 'file' | 'for'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">            |'function' | 'goto' | 'if' | 'in' | 'label' | 'mod'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">            |'nil' | 'not' | 'of' | 'or' | 'packed' | 'procedure'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">            |'program' | 'record' | 'repeat' | 'set' | 'then'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">            |'to' | 'type' | 'until' | 'var' | 'while' | 'with' .</pre>
</ul>
<h3><a name="6.1.3 Identifiers">6.1.3 Identifiers</a></h3>
<p>Identifiers can be of any length. The spelling of an identifier shall be 
composed from all its constituent characters taken in textual order, without regard for the case of letters. No identifier shall have the same spelling as any word-symbol. Identifiers that are specified to be required 
shall have special significance (see <b><a href="#6.2.2.10">6.2.2.10</a></b> and <b><a href="#6.10 Programs">6.10</a></b>).</p>
<ul>
    <p>identifier = letter { letter | digit }.</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">X</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">time</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">readinteger</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">WG4</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">AlterHeatSetting</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">InquireWorkstationTransformation</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">InquireWorkstationIdentification</pre>
</ul>
<h3><a name="6.1.4 Directives">6.1.4 Directives</a></h3>
<p>A directive shall only occur in a procedure-declaration or a function-declaration. The only directive shall be the required directive <b>forward</b> (see <b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b> and <b><a href="#6.6.2 Function-declarations">6.6.2</a></b>). No directive 
shall have the same spelling as any word-symbol.</p>
<ul>
    <p>directive = letter { letter | digit }.</p>
</ul>
<p>NOTE -- Many processors provide, as an extension, the directive external, 
which is used to specify that the procedure-block or function-block corresponding to that procedure-heading 
or function-heading is external to the program-block. Usually it is in a library in a form to be input to, 
or that has been produced by, the processor.</p>
<h3><a name="6.1.5 Numbers">6.1.5 Numbers</a></h3>
<p>An unsigned-integer shall denote in decimal notation a value of integer-type 
(see <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b>). An unsigned-real shall denote in decimal notation a value of real-type (see 
<b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b>). The letter 'e' preceding a scale-factor shall mean times ten to the power of. The value 
denoted by an unsignedinteger shall be in the closed interval 0 to <b>maxint</b> (see <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> and <b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b>).</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">signed-number = signed-integer | signed-real .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">signed-real = [ sign ] unsigned-real .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">signed-integer = [ sign ] unsigned-integer .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">unsigned-number = unsigned-integer | unsigned-real .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">sign = '+' | '-' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">unsigned-real = digit-sequence '.' fractional-part [ 'e' scale-factor</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">              |digit-sequence 'e' scale-factor .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">unsigned-integer = digit-sequence .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">fractional-part = digit-sequence .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">scale-factor = [ sign ] digit-sequence .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">digit-sequence = digit { digit } .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">1e10</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">+100</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">-0.1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">5e-3</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">87.35E+8</pre>
</ul>
<h3><a name="6.1.6 Labels">6.1.6 Labels</a></h3>
<p>Labels shall be digit-sequences and shall be distinguished by their apparent 
integral values and shall be in the closed interval 0 to 9999. The spelling of a label shall be its 
apparent integral value.</p>
<ul>
<p>label = digit-sequence .</p>
</ul>
<h3><a name="6.1.7 Character-strings">6.1.7 Character-strings</a></h3>
<p>A character-string containing a single string-element shall denote a value 
of the required char-type (see <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b>). A character-string containing more than one string-element 
shall denote a value of a string-type (see <b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>) with the same number of components as the 
character-string contains string-elements. All character-strings with a given number of components 
shall possess the same string-type.</p>
<p>There shall be an implementation-defined one-to-one correspondence between 
the set of alternatives from which string-elements are drawn and a subset of the values of the required 
char-type. The occurrence of a string-element in a character-string shall denote the occurrence 
of the corresponding value of char-type.</p>
<ul>
<p>character-string = ''' string-element { string-element } '''&nbsp;.</p>
<p>string-element = apostrophe-image | string-character .</p>
<p>apostrophe-image = ''' .</p>
<p>string-character = one-of-a-set-of-implementation-defined-characters .</p>
</ul>
<p>NOTE -- Conventionally, the apostrophe-image is regarded as a substitute for 
the apostrophe character, which cannot be a string-character.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">'A'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">';'</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">''''</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">'Pascal '</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">'THIS IS A STRING'</pre>
</ul>
<h3><a name="6.1.8 Token separators">6.1.8 Token separators</a></h3>
<p>Where a commentary shall be any sequence of characters and separations of 
lines, containing neither } nor *), the construct</p>
<p>( '{' | '(*' ) commentary ( '*)' | '}' )</p>
<p>shall be a comment if neither the { nor the (* occurs within a character-string 
or within a commentary.</p>
<p>NOTES</p>
<p>1 A comment may thus commence with { and end with *), or commence with (* 
and end with }.</p>
<p>2 The sequence (*) cannot occur in a commentary even though the sequence 
{) can.</p>
<p>Comments, spaces (except in character-strings), and the separations of consecutive 
lines shall be considered to be token separators. Zero or more token separators can occur 
between any two consecutive tokens, before the first token of a program text, or after the 
last token of the program text. There shall be at least one separator between any pair of consecutive 
tokens made up of identifiers, word-symbols, labels or unsigned-numbers. No separators shall 
occur within tokens.</p>
<h3><a name="6.1.9 Lexical alternatives">6.1.9 Lexical alternatives</a></h3>
<p>The representation for lexical tokens and separators given in <b><a href="#6.1.1 General">6.1.1</a></b> to 
<b><a href="#6.1.8 Token separators">6.1.8</a></b>, except for the character sequences (* and *), shall constitute a reference representation for these 
tokens and separators.</p>
<p>To facilitate the use of Pascal on processors that do not support the reference 
representation, the following alternatives have been defined. All processors that have the required 
characters in their character set shall provide both the reference representations and the alternative 
representations, and the corresponding tokens or separators shall not be distinguished. Provision 
of the reference representations, and of the alterative token @, shall be implementation-defined.</p>
<p>The alternative representations for the tokens shall be</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Reference token Alternative token</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        ^               @</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        [               (.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        ]               .)</pre>
<p>NOTE -- 1 The character ^(up arrow) that appears in some national variants of ISO 
646 is regarded as identical to the character ^. In this International Standard, the character ^ has been 
used because of its greater visibility.</p>
<p>The comment-delimiting characters { and } shall be the reference representations, 
and (* and *) respectively shall be alternative representations (see <b><a href="#6.1.8 Token separators">6.1.8</a></b>).</p>
<p>NOTE -- 2 See also <a href="#1.2"><b>1.2</b></a> f).</p>
<h2><a name="6.2 Blocks, scopes, and activations">6.2 Blocks, scopes, and activations</a></h2>
<h3><a name="6.2.1 Blocks">6.2.1 Blocks</a></h3>
<p>A block closest-containing a label-declaration-part in which a label occurs 
shall closest-contain exactly one statement in which that label occurs. The occurrence of a label in the 
label-declaration-part of a block shall be its defining-point for the region that is the block. Each 
applied occurrence of that label (see <b><a href="#6.2.2.8">6.2.2.8</a></b>) shall be a label. Within an activation of the block, 
all applied occurrences of that label shall denote the corresponding program-point in the algorithm 
of the activation at that statement (see <b><a href="#6.2.3.2">6.2.3.2</a> b</b>)).</p>
<ul>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">block = label-declaration-part constant-definition-part type-definition-part</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        variable-declaration-part procedure-and-function-declaration-part</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        statement-part.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        label-declaration-part = [ 'label' label { ',' label } ';' ].</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        constant-definition-part = [ 'const' constant-definition ';' { constant-definition ';' } ].</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        type-definition-part = [ 'type' type-definition ';' { type-definition ';' } ].</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        variable-declaration-part = [ 'var' variable-declaration ';' { variable-declaration ';' } ].</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        procedure-and-function-declaration-part = { ( procedure-declaration</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                                    | function-declaration ) ';' }.</pre>
</ul>
<p>The statement-part shall specify the algorithmic actions to be executed upon 
an activation of the block.</p>
<ul>
<p>statement-part = compound-statement .</p>
</ul>
<h3><a name="6.2.2 Scopes">6.2.2 Scopes</a></h3>
<h4><a name="6.2.2.1">6.2.2.1</a></h4>
<p>Each identifier or label contained by the program-block shall have a defining-point.</p>
<h4><a name="6.2.2.2">6.2.2.2</a></h4>
<p>Each defining-point shall have a region that is a part of the program text, 
and a scope that is a part or all of that region.</p>
<h4><a name="6.2.2.3">6.2.2.3</a></h4>
<p>The region of each defining-point is defined elsewhere (see <b><a href="#6.2.1 Blocks">6.2.1</a></b>, <b><a href="#6.2.2.10">6.2.2.10</a></b>, <b><a href="#6.3 Constant-definitions">6.3</a></b>, <b><a href="#6.4.1 General">6.4.1</a></b>, <b><a href="#6.4.2.3 Enumerated-types">6.4.2.3</a></b>, 
<b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>, <b><a href="#6.5.1 Variable-declarations">6.5.1</a></b>, <b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>, <b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b>, <b><a href="#6.6.2 Function-declarations">6.6.2</a></b>, <b><a href="#6.6.3.1 General">6.6.3.1</a></b>, <b><a href="#6.8.3.10 With-statements">6.8.3.10</a></b>, 
<b><a href="#6.10 Programs">6.10</a></b>).</p>
<h4><a name="6.2.2.4">6.2.2.4</a></h4>
<p>The scope of each defining-point shall be its region (including all regions 
enclosed by that region) subject to <b><a href="#6.2.2.5">6.2.2.5</a></b> and <b><a href="#6.2.2.6">6.2.2.6</a></b>.</p>
<h4><a name="6.2.2.5">6.2.2.5</a></h4>
<p>When an identifier or label has a defining-point for region A and another 
identifier or label having the same spelling has a defining-point for some region B enclosed by A, then 
region B and all regions enclosed by B shall be excluded from the scope of the defining-point for 
region A.</p>
<h4><a name="6.2.2.6">6.2.2.6</a></h4>
<p>The region that is the field-specifier of a field-designator shall be excluded 
from the enclosing scopes.</p>
<h4><a name="6.2.2.7">6.2.2.7</a></h4>
<p>When an identifier or label has a defining-point for a region, another identifier 
or label with the same spelling shall not have a defining-point for that region.</p>
<h4><a name="6.2.2.8">6.2.2.8</a></h4>
<p>Within the scope of a defining-point of an identifier or label, each occurrence 
of an identifier or label having the same spelling as the identifier or label of the defining-point 
shall be designated an applied occurrence of the identifier or label of the defining-point, except for an 
occurrence that constituted the defining-point ; such an occurrence shall be designated a defining occurrence. 
No occurrence outside that scope shall be an applied occurrence.</p>
<p>NOTE -- Within the scope of a defining-point of an identifier or label, there 
are no applied occurrences of an identifier or label that cannot be distinguished from it and have a defining-point 
for a region enclosing that scope.</p>
<h4><a name="6.2.2.9">6.2.2.9</a></h4>
<p>The defining-point of an identifier or label shall precede all applied occurrences 
of that identifier or label contained by the program-block with one exception, namely that an 
identifier can have an applied occurrence in the type-identifier of the domain-type of any new-pointer-types 
contained by the type-definition-part containing the defining-point of the type-identifier.</p>
<h4><a name="6.2.2.10">6.2.2.10</a></h4>
<p>Required identifiers that denote required values, types, procedures, and 
functions shall be used as if their defining-points have a region enclosing the program (see <b><a href="#6.1.3 Identifiers">6.1.3</a></b>, <b><a href="#6.3 Constant-definitions">6.3</a></b>, <b><a href="#6.4.1 General">6.4.1</a></b>, and <b>6.6.4.1</b>). 
</p>
<p>NOTE -- The required identifiers input and output are not included, since 
these denote variables.</p>
<h4><a name="6.2.2.11">6.2.2.11</a></h4>
<p>Whatever an identifier or label denotes at its defining-point shall be denoted 
at all applied occurrences of that identifier or label.</p>
<p>NOTES</p>
<p>1 Within syntax definitions, an applied occurrence of an identifier is qualified 
(e.g., type-identifier), whereas a use that constitutes a defining-point is not qualified.</p>
<p>2 It is intended that such qualification indicates the nature of the entity 
denoted by the applied occurrence: e.g., a constant-identifier denotes a constant.</p>
<h3><a name="6.2.3 Activations">6.2.3 Activations</a></h3>
<h4><a name="6.2.3.1">6.2.3.1</a></h4>
<p>A procedure-identifier or function-identifier having a defining-point for 
a region that is a block within the procedure-and-function-declaration-part of that block shall be designated 
local to that block.</p>
<h4><a name="6.2.3.2">6.2.3.2</a></h4>
<p>The activation of a block shall contain</p>
<ul>
<p>a) for the statement-part of the block, an algorithm, the completion of which 
shall terminate the activation (see also <b><a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b>);</p>
<p>b) for each defining-point of a label in the label-declaration-part of the 
block, a corresponding program-point (see <b><a href="#6.2.1 Blocks">6.2.1</a></b>);</p>
<p>c) for each variable-identifier having a defining-point for the region that 
is the block, a variable possessing the type associated with the variable-identifier;</p>
<p>d) for each procedure-identifier local to the block, a procedure with the 
procedure-block corresponding to the procedure-identifier, and the formal-parameters of that procedure-block;</p>
<p>e) for each function-identifier local to the block, a function with the function-block 
corresponding to, and the result type associated with, the function-identifier, and the 
formal-parameters of that function-block;</p>
<p>f) if the block is a function-block, a result possessing the associated result 
type.</p>
</ul>
<p>NOTE -- Each activation contains its own algorithm, program-points, variables, 
procedures, and functions, distinct from every other activation.</p>
<h4><a name="6.2.3.3">6.2.3.3</a></h4>
<p>The activation of a procedure or function shall be an activation of the block 
of the procedure-block of the procedure or function-block of the function, respectively, and shall 
be designated as within</p>
<ul>
<p>a) the activation containing the procedure or function ; and</p>
<p>b) all activations that that containing activation is within.</p>
</ul>
<p>NOTE -- An activation of a block B can only be within activations of blocks 
containing B. Thus, an activation is not within another activation of the same block.</p>
<p>Within an activation, an applied occurrence of a label or variable-identifier, 
or of a procedure-identifier or function-identifier local to the block of the activation, shall denote 
the corresponding program-point, variable, procedure, or function, respectively, of that activation 
; except that the function-identifier of an assignment-statement shall, within an activation 
of the function denoted by that function-identifier, denote the result of that activation.</p>
<h4><a name="6.2.3.4">6.2.3.4</a></h4>
<p>A procedure-statement or function-designator contained in the algorithm of 
an activation and that specifies an activation of a block shall be designated the activation-point 
of the activation of the block.</p>
<h4><a name="6.2.3.5">6.2.3.5</a></h4>
<p>All variables contained by an activation, except for those listed as program-parameters, 
and any result of an activation, shall be totally-undefined at the commencement of 
that activation. The algorithm, program-points, variables, procedures, and functions, if any, 
shall exist until the termination of the activation.</p>
<h2><a name="6.3 Constant-definitions">6.3 Constant-definitions</a></h2>
<p>A constant-definition shall introduce an identifier to denote a value.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">constant-definition = identifier '=' constant .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">constant = [ sign ] ( unsigned-number | constant-identifier )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">         | character-string .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">constant-identifier = identifier .</pre>
</ul>
<p>The occurrence of an identifier in a constant-definition of a constant-definition-part 
of a block shall constitute its defining-point for the region that is the block. The constant 
in a constant-definition shall not contain an applied occurrence of the identifier in the constant-definition. Each applied occurrence of that identifier shall be a constant-identifier and shall denote 
the value denoted by the constant of the constant-definition. A constant-identifier in a constant 
containing an occurrence of a sign shall have been defined to denote a value of real-type or of integer-type. The required constant-identifiers shall be as specified in <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> and <b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b>.</p>
<h2><a name="6.4 Type-definitions">6.4 Type-definitions</a></h2>
<h3><a name="6.4.1 General">6.4.1 General</a></h3>
<p>A type-definition shall introduce an identifier to denote a type. Type shall 
be an attribute that is possessed by every value and every variable. Each occurrence of a new-type 
shall denote a type that is distinct from any other new-type.</p>
<ul>
<p>type-definition = identifier '=' type-denoter .</p>
<p>type-denoter = type-identifier | new-type .</p>
<p>new-type = new-ordinal-type | new-structured-type | new-pointer-type .</p>
</ul>
<p>The occurrence of an identifier in a type-definition of a type-definition-part 
of a block shall constitute its defining-point for the region that is the block. Each applied occurrence 
of that identifier shall be a type-identifier and shall denote the same type as that which is denoted 
by the type-denoter of the type-definition. Except for applied occurrences in the domain-type of 
a new-pointer-type, the type-denoter shall not contain an applied occurrence of the identifier in 
the type-definition.</p>
<p>Types shall be classified as simple-types, structured-types or pointer-types. The required typeidentifiers and corresponding required types shall be as specified in <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> and 
<b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>.</p>
<ul>
<p>simple-type-identifier = type-identifier .</p>
<p>structured-type-identifier = type-identifier .</p>
<p>pointer-type-identifier = type-identifier .</p>
<p>type-identifier = identifier .</p>
</ul>
<p>A type-identifier shall be considered as a simple-type-identifier, a structured-type-identifier, 
or a pointer-type-identifier, according to the type that it denotes.</p>
<h3><a name="6.4.2 Simple-types">6.4.2 Simple-types</a></h3>
<h4><a name="6.4.2.1 General">6.4.2.1 General</a></h4>
<p>A simple-type shall determine an ordered set of values. A value of an ordinal-type 
shall have an integer ordinal number ; the ordering relationship between any two such values 
of one type shall be the same as that between their ordinal numbers. An ordinal-type-identifier shall 
denote an ordinal-type. A real-type-identifier shall denote the real-type.</p>
<ul>
<p>simple-type = ordinal-type | real-type-identifier .</p>
<p>ordinal-type = new-ordinal-type | ordinal-type-identifier .</p>
<p>new-ordinal-type = enumerated-type | subrange-type .</p>
<p>ordinal-type-identifier = type-identifier .</p>
<p>real-type-identifier = type-identifier .</p>
</ul>
<h4><a name="6.4.2.2 Required simple-types">6.4.2.2 Required simple-types</a></h4>
<p>The following types shall exist</p>
<ul>
<p>a)<i> integer-typ</i>e. The required type-identifier integer shall denote the integer-type. The integer-type shall be an ordinal-type. The values shall be a subset of the whole numbers, 
denoted as specified in <b><a href="#6.1.5 Numbers">6.1.5</a></b> by signed-integer (see also <b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b>). The ordinal 
number of a value of integer-type shall be the value itself.</p>
<p>b) <i>real-type</i>. The required type-identifier real shall denote the real-type. The real-type shall be a simple-type. The values shall be an implementation-defined subset of 
the real numbers, denoted as specified in <b><a href="#6.1.5 Numbers">6.1.5</a></b> by signed-real.</p>
<p>c) <i>Boolean-typ</i>e. The required type-identifier Boolean shall denote the Boolean-type. The Boolean-type shall be an ordinal-type. The values shall be the enumeration 
of truth values denoted by the required constant-identifiers false and true, such that false 
is the predecessor of true. The ordinal numbers of the truth values denoted by false and true 
shall be the integer values 0 and 1 respectively.</p>
<p>d) <i>char-type</i>. The required type-identifier char shall denote the char-type. The char-type shall be an ordinal-type. The values shall be the enumeration of a set of 
implementation-defined characters, some possibly without graphic representations. The ordinal numbers 
of the character values shall be values of integer-type that are implementation-defined 
and that are determined by mapping the character values on to consecutive non-negative 
integer values starting at zero. The following relations shall hold.</p>
    <ul>
<p>1) The subset of character values representing the digits 0 to 9 shall be 
numerically ordered and contiguous.</p>
<p>2) The subset of character values representing the upper case letters A to 
Z, if available, shall be alphabetically ordered but not necessarily contiguous.</p>
<p>3) The subset of character values representing the lower case letters a to 
z, if available, shall be alphabetically ordered but not necessarily contiguous.</p>
    </ul>
</ul>
<p>NOTE -- Operators applicable to the required simple-types are specified 
in <b><a href="#6.7.2 Operators">6.7.2</a></b>.</p>
<h4><a name="6.4.2.3 Enumerated-types">6.4.2.3 Enumerated-types</a></h4>
<ul>
<p>enumerated-type = '(' identifier-list ')' .</p>
<p>identifier-list = identifier { ',' identifier } .</p>
</ul>
<p>The occurrence of an identifier in the identifier-list of an enumerated-type 
shall constitute its defining-point for the region that is the block closest-containing the enumerated-type. Each applied occurrence of the identifier shall be a constant-identifier. Within an activation 
of the block, all applied occurrences of that identifier shall possess the type denoted by 
the enumerated-type and shall denote the type's value whose ordinal number is the number of occurrences 
of identifiers preceding that identifier in the identifier-list.</p>
<p>NOTE -- Enumerated type constants are ordered by the sequence in which they 
are de fi ned, and they have consecutive ordinal numbers starting at zero.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">(red, yellow, green, blue, tartan)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">(club, diamond, heart, spade)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">(married, divorced, widowed, single)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">(scanning, found, notpresent)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">(Busy, InterruptEnable, ParityError, OutOfPaper, LineBreak)</pre>
</ul>
<h4><a name="6.4.2.4 Subrange-types">6.4.2.4 Subrange-types</a></h4>
<p>A subrange-type shall include identification of the smallest and the largest 
value in the subrange. The first constant of a subrange-type shall specify the smallest value, and 
this shall be less than or equal to the largest value, which shall be specified by the second constant 
of the subrange-type. Both constants shall be of the same ordinal-type, and that ordinal-type shall 
be designated the host-type of the subrange-type.</p>
<ul>
<p>subrange-type = constant '..' constant.</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">1..100</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">-10..+10</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">red..green</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">'0'..'9'</pre>
</ul>
<h3><a name="6.4.3 Structured-types">6.4.3 Structured-types</a></h3>
<h4><a name="6.4.3.1 General">6.4.3.1 General</a></h4>
<p>A new-structured-type shall be classified as an array-type, record-type, 
set-type, or file-type according to the unpacked-structured-type closest-contained by the new-structured-type. A component of a value of a structured-type shall be a value.</p>
<ul>
<p>structured-type = new-structured-type | structured-type-identifier.</p>
<p>new-structured-type = [ '<b>packed</b>' ] unpacked-structured-type.</p>
<p>unpacked-structured-type = array-type | record-type | set-type | file-type.</p>
</ul>
<p>The occurrence of the token packed in a new-structured-type shall designate 
the type denoted thereby as packed. The designation of a structured-type as packed shall 
indicate to the processor that data-storage of values should be economized, even if this causes operations 
on, or accesses to components of, variables possessing the type to be less efficient in terms 
of space or time.</p>
<p>The designation of a structured-type as packed shall affect the representation 
in data-storage of that structured-type only; i.e., if a component is itself structured, the 
component's representation in data-storage shall be packed only if the type of the component is designated 
packed.</p>
<p>NOTE -- The ways in which the treatment of entities of a type is affected 
by whether or not the type is designated packed are specified in <b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>, <b><a href="#6.4.5 Compatible types">6.4.5</a></b>, <b><a href="#6.6.3.3 Variable parameters">6.6.3.3</a></b>, <b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b><a href="#6.6.3.8 Conformability">,</a> <b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b>, and <b><a href="#6.7.1 General">6.7.1</a></b>.</p>
<h4><a name="6.4.3.2 Array-types">6.4.3.2 Array-types</a></h4>
<p>An array-type shall be structured as a mapping from each value specified 
by its index-type to a distinct component. Each component shall have the type denoted by the 
type-denoter of the component-type of the array-type.</p>
<ul>
<p>array-type = '<b>array</b>' '[' index-type { ',' index-type } ']' 'of' component-type 
    .</p>
<p>index-type = ordinal-type .</p>
<p>component-type = type-denoter .</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example 1:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [1..100] of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [Boolean] of colour</pre>
</ul>
<p>An array-type that specifies a sequence of two or more index-types shall 
be an abbreviated notation for an array-type specified to have as its index-type the first index-type 
in the sequence and to have a component-type that is an array-type specifying the sequence of index-types 
without the first indextype in the sequence and specifying the same component-type as the original specification. The component-type thus constructed shall be designated packed if and only if 
the original array-type is designated packed. The abbreviated form and the full form shall be equivalent.</p>
<p>NOTE -- 1 Each of the following two examples thus contains different ways 
of expressing its array-type.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example 2:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [Boolean] of array [1..10] of array [size] of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [Boolean] of array [1..10, size] of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [Boolean, 1..10, size] of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">array [Boolean, 1..10] of array [size] of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example 3:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">packed array [1..10, 1..8] of Boolean</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">packed array [1..10] of packed array [1..8] of Boolean</pre>
</ul>
<p>Let i denote a value of the index-type ; let V i denote a value of that component 
of the array-type that corresponds to the value i by the structure of the array-type ; let 
the smallest and largest values specified by the index-type be denoted by m and n, respectively ; and let 
k = (ord(n)-ord(m)+1) denote the number of values specified by the index-type ; then the values 
of the array-type shall be the distinct k-tuples of the form</p>
<ul>
<p>(Vm ,...,V n ).</p>
</ul>
<p>NOTE -- 2 A value of an array-type does not therefore exist unless all of 
its component-values are de fi ned. If the component-type has c values, then it follows that the cardinality 
of the set of values of the array-type is c raised to the power k.</p>
<p>Any type designated packed and denoted by an array-type having as its index-type 
a denotation of a subrange-type specifying a smallest value of 1 and a largest value of greater 
than 1, and having as its component-type a denotation of the char-type, shall be designated a string-type.</p>
<p>The correspondence of character-strings to values of string-types is obtained 
by relating the individual string-elements of the character-string, taken in textual order, to the components 
of the values of the string-type in order of increasing index.</p>
<p>NOTE -- 3 The values of a string-type possess additional properties which 
allow writing them to textfiles (see <b><a href="#6.9.3.6 String-types">6.9.3.6</a></b>) and define their use with relational-operators (see <b><a href="#6.7.2.5 Relational operators">6.7.2.5</a></b>).</p>
<h4><a name="6.4.3.3 Record-types">6.4.3.3 Record-types</a></h4>
<p>The structure and values of a record-type shall be the structure and values 
of the field-list of the record-type.</p>
<ul>
<p>record-type = 'record' field-list 'end' .</p>
<p>field-list = [ ( fixed-part [ ';' variant-part ] | variant-part ) [ ' ;' 
] ] .</p>
<p>fixed-part = record-section { ' ;' record-section } .</p>
<p>record-section = identifier-list ' :' type-denoter .</p>
<p>field-identifier = identifier .</p>
<p>variant-part = '<b>case</b>' variant-selector 'of' variant {  ' ;' variant } 
    .</p>
<p>variant-selector = [ tag-field ' :' ] tag-type .</p>
<p>tag-field = identifier .</p>
<p>variant = case-constant-list ' :' '(' field-list ')' .</p>
<p>tag-type = ordinal-type-identifier .</p>
<p>case-constant-list = case-constant { ',' case-constant } .</p>
<p>case-constant = constant .</p>
</ul>
<p>A field-list containing neither a fixed-part nor a variant-part shall have 
no components, shall define a single null value, and shall be designated empty.</p>
<p>The occurrence of an identifier in the identifier-list of a record-section 
of a fixed-part of a field-list shall constitute its defining-point as a field-identifier for the region 
that is the record-type closest containing the field-list and shall associate the field-identifier with a distinct component, 
which shall be designated a field, of the record-type and of the field-list. That component 
shall have the type denoted by the type-denoter of the record-section. </p>
<p>The field-list closest-containing a variant-part shall have a distinct component 
that shall have the values and structure defined by the variant-part.</p>
<p>Let Vi denote the value of the i-th component of a non-empty field-list having 
m components ; then the values of the field-list shall be distinct m-tuples of the form</p>
<ul>
<p>(V1 , V 2,...,Vm).</p>
</ul>
<p>NOTE -- 1 If the type of the i-th component has Fi values, then the cardinality 
of the set of values of the field-list is (F 1 * F 2 *... * Fm).</p>
<p>A tag-type shall be the type denoted by the ordinal-type-identifier of the 
tag-type. A case-constant shall denote the value denoted by the constant of the case-constant.</p>
<p>The type of each case-constant in the case-constant-list of a variant of 
a variant-part shall be compatible with the tag-type of the variant-selector of the variant-part. The values denoted by all case-constants of a type that is required to be compatible with a given 
tag-type shall be distinct and the set thereof shall be equal to the set of values specified by the 
tag-type. The values denoted by the case-constants of the case-constant-list of a variant shall be designated 
as corresponding to the variant.</p>
<p>With each variant-part shall be associated a type designated the selector-type 
possessed by the variant-part. If the variant-selector of the variant-part contains a tag-field, 
or if the case-constantlist of each variant of the variant-part contains only one case-constant, then 
the selector-type shall be denoted by the tag-type, and each variant of the variant-part shall be 
associated with those values specified by the selector-type denoted by the case-constants of the 
case-constant-list of the variant. Otherwise, the selector-type possessed by the variant-part shall 
be a new ordinal-type that is constructed to possess exactly one value for each variant of the variant-part, 
and no others, and each such variant shall be associated with a distinct value of that type.</p>
<p>Each variant-part shall have a component which shall be designated the selector 
of the variant-part, and which shall possess the selector-type of the variant-part. If the variant-selector 
of the variant-part contains a tag-field, then the occurrence of an identifier in the tag-field 
shall constitute the defining-point of the identifier as a field-identifier for the region that is the record-type 
closest-containing the variant-part and shall associate the field-identifier with the selector of 
the variant-part. The selector shall be designated a fi eld of the record-type if and only if it is associated 
with a field-identifier.</p>
<p>Each variant of a variant-part shall denote a distinct component of the variant-part 
; the component shall have the values and structure of the field-list of the variant, and 
shall be associated with those values specified by the selector-type possessed by the variant-part associated 
with the variant. The value of the selector of the variant-part shall cause the associated variant 
and component of the variant-part to be in a state that shall be designated active.</p>
<p>The values of a variant-part shall be the distinct pairs</p>
<ul>
<p>(k, Xk )</p>
</ul>
<p>where k represents a value of the selector of the variant-part, and X k is 
a value of the field-list of the active variant of the variant-part.</p>
<p>NOTES</p>
<p>2 If there are n values specified by the selector-type, and if the fi eld-list 
of the variant associated with the i-th value has T i values, then the cardinality of the set of values of the 
variant-part is (T1 + T2 +... +Tn ). There is no component of a value of a variant-part corresponding to 
any non-active variant of the variant-part.</p>
<p>3 Restrictions placed on the use of fi elds of a record-variable pertaining 
to variant-parts are specified in <b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>, <b><a href="#6.6.3.3 Variable parameters">6.6.3.3</a></b>, and <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b>.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">record</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  year : 0..2000;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  month : 1..12;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  day : 1..31</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">record</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  name, firstname : string;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  age : 0..99;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  case married : Boolean of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    true : (Spousesname : string);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    false : ( )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">record</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  x, y : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  area : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  case shape of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    triangle :</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      (side : real ; inclination, angle1, angle2 : angle);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    rectangle :</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      (side1, side2 : real ; skew : angle);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    circle :</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      (diameter : real);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<h4><a name="6.4.3.4 Set-types">6.4.3.4 Set-types</a></h4>
<p>A set-type shall determine the set of values that is structured as the power 
set of the base-type of the set-type. Thus, each value of a set-type shall be a set whose members 
shall be unique values of the base-type.</p>
<ul>
<p>set-type = '<b>se</b>t' 'of' base-type .</p>
<p>base-type = ordinal-type .</p>
</ul>
<p>NOTE -- 1 Operators applicable to values of set-types are specified in <b><a href="#6.7.2.4 Set operators">6.7.2.4</a></b>.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">set of char</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">set of (club, diamond, heart, spade)</pre>
</ul>
<p>NOTE -- 2 If the base-type of a set-type has b values, then the cardinality 
of the set of values is 2 raised to the power b.</p>
<p>For each ordinal-type T that is not a subrange-type, there shall exist both 
an unpacked settype designated the unpacked-canonical-set-of-T-type and a packed set-type designated 
the packedcanonical-set-of-T-type. If S is any subrange-type and T is its host-type, then the 
set of values determined by the type set of S shall be included in the sets of values determined 
by the unpackedcanonical-set-of-T-type and by the packed-canonical-set-of-T-type (see <b><a href="#6.7.1 General">6.7.1</a></b>).</p>
<h4><a name="6.4.3.5 File-types">6.4.3.5 File-types</a></h4>
<p>NOTE -- 1 A file-type describes sequences of values of the specified component-type, 
together with a current position in each sequence and a mode that indicates whether the sequence 
is being inspected or generated.</p>
<ul>
<p>file-type = 'file' 'of' component-type .</p>
</ul>
<p>A type-denoter shall not be permissible as the component-type of a file-type 
if it denotes either a file-type or a structured-type having any component whose type-denoter is 
not permissible as the component-type of a file-type.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">file of real</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">file of vector</pre>
</ul>
<p>A file-type shall define implicitly a type designated a sequence-type having 
exactly those values, which shall be designated sequences, defined by the following five rules 
in items a) to e).</p>
<p>NOTE -- 2 The notation x~y represents the concatenation of sequences x and 
y. The explicit representation of sequences (e.g., S(c)), of concatenation of sequences ; of the first, 
last, and rest selectors ; and of sequence equality is not part of the Pascal language. These notations are used to 
de fine fi le values, below, and the required file operations in <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b> and <b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b>.</p>
<ul>
<p>a) S( ) shall be a value of the sequence-type S and shall be designated the 
empty sequence. The empty sequence shall have no components.</p>
<p>b) Let c be a value of the specified component-type and let x be a value 
of the sequence-type S; then S(c) shall be a sequence of type S, consisting of the single component-value 
c, and both S(c) ~x and x ~ S(c) shall be sequences, distinct from S( ), of type S.</p>
<p>c) Let c, S, and x be as in b), let y denote the sequence S(c) ~x and let 
z denote the sequence x~S(c) ; then the notation y.first shall denote c (i.e., the first component-value 
of y), y.rest shall denote x (i.e., the sequence obtained from y by deleting the first component), 
and z.last shall denote c (i.e., the last component-value of z).</p>
<p>d) Let x and y each be a non-empty sequence of type S ; then x = y shall 
be true if and only if both (x.first = y.first) and (x.rest = y.rest) are true. If x or y is the 
empty sequence, then x = y shall be true if and only if both x and y are the empty sequence.</p>
<p>e) Let x, y, and z be sequences of type S ; then x ~ (y ~z) = (x~ y) ~ z, 
S( ) ~x = x, and x ~ S( ) = x shall be true.</p>
</ul>
<p>A file-type also shall define implicitly a type designated a mode-type having 
exactly two values, which are designated Inspection and Generation.</p>
<p>NOTE -- 3 The explicit denotation of the values Inspection and Generation 
is not part of the Pascal language.</p>
<p>A file-type shall be structured as three components. Two of these components, 
designated f.L and f.R, shall be of the implicit sequence-type. The third component, designated 
f.M, shall be of the implicit mode-type.</p>
<p>Let f.L and f.R each be a single value of the sequence-type and let f.M 
be a single value of the mode-type ; then each value of the file-type shall be a distinct triple of 
the form</p>
<ul>
<p>(f.L, f.R, f.M)</p>
</ul>
<p>where f.R shall be the empty sequence if f.M is the value Generation. The 
value, f, of the file-type shall be designated empty if and only if f.L ~ f.R is the empty sequence.</p>
<p>NOTE -- 4 The two components, f.L and f.R, of a value of the fi le-type may 
be considered to represent the single sequence f.L ~ f.R together with a current position in that sequence. If f.R is non-empty, then f.R. first may be considered the current component as determined by the current position 
; otherwise, the current position is the end-of- file position.</p>
<p>There shall be a file-type that is denoted by the required structured-type-identifier 
text. The structure of the type denoted by <b>text</b> shall define an additional sequence-type 
whose values shall be designated lines. A line shall be a sequence cs ~S(end-of-line), where cs 
is a sequence of components possessing the char-type, and end-of-line shall represent a special component-value. Any assertion in clause <b>6</b> that the end-of-line value is attributed to a variable other 
than a component of a sequence shall be construed as an assertion that the variable has attributed to it 
the char-type value space. If l is a line, then no component of l other than l.last shall be an end-of-line. There shall be an implementation-defined subset of the set of char-type values, designated 
characters prohibited from textfi les; the effect of causing a character in that subset to be attributed 
to a component of either t.L or t.R for any textfile t shall be implementation-dependent.</p>
<p>A line-sequence, ls, shall be either the empty sequence or the sequence l 
~ ls' where l is a line and ls' is a line-sequence.</p>
<p>Every value t of the type denoted by text shall satisfy the following two 
rules:</p>
<ul>
<p>a) If t.M = Inspection, then t.L ~ t.R shall be a line-sequence.</p>
<p>b) If t.M = Generation, then t.L ~ t.R shall be ls ~cs, where ls is a line-sequence 
and cs is a sequence of components possessing the char-type.</p>
</ul>
<p>NOTE -- 5 In rule b), cs may be considered, especially if it is non-empty, 
to be a partial line that is being generated. Such a partial line cannot occur during inspection of a fi le. Also, cs does not correspond to t.R, since t.R is the empty sequence if t.M = Generation.</p>
<p>A variable that possesses the type denoted by the required type-identifier 
text shall be designated a textfile.</p>
<p>NOTE -- 6 All required procedures and functions applicable to a variable of 
type file of char are applicable to text files. Additional required procedures and functions, applicable 
only to text fi les, are defined in <b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b> and <b><a href="#6.9 Input and output">6.9</a></b>.</p>
<h3><a name="6.4.4 Pointer-types">6.4.4 Pointer-types</a></h3>
<p>The values of a pointer-type shall consist of a single nil-value and a set 
of identifying-values each identifying a distinct variable possessing the domain-type of the new-pointer-type. The set of identifying-values shall be dynamic, in that the variables and the values 
identifying them shall be permitted to be created and destroyed during the execution of the program. Identifying-values and the variables identified by them shall be created only by the required procedure 
new (see <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b>).</p>
<p>NOTE -- 1 Since the nil-value is not an identifying-value, it does not identify 
a variable.</p>
<p>The token nil shall denote the nil-value in all pointer-types .</p>
<ul>
<p>pointer-type = new-pointer-type | pointer-type-identifier .</p>
<p>new-pointer-type = '^' domain-type .</p>
<p>domain-type = type-identifier .</p>
</ul>
<p>NOTE -- 2 The token nil does not have a single type, but assumes a suitable 
pointer-type to satisfy the assignment-compatibility rules, or the compatibility rules for operators, 
if possible.</p>
<h3><a name="6.4.5 Compatible types">6.4.5 Compatible types</a></h3>
<p>Types T1 and T2 shall be designated compatible if any of the following four 
statements is true:</p>
<ul>
<p>a) T1 and T2 are the same type.</p>
<p>b) T1 is a subrange of T2, or T2 is a subrange of T1, or both T1 and T2 are 
subranges of the same host-type.</p>
<p>c) T1 and T2 are set-types of compatible base-types, and either both T1 and 
T2 are designated packed or neither T1 nor T2 is designated packed.</p>
<p>d) T1 and T2 are string-types with the same number of components.</p>
</ul>
<h3><a name="6.4.6 Assignment-compatibility">6.4.6 Assignment-compatibility</a></h3>
<p>A value of type T2 shall be designated assignment-compatible with a type 
T1 if any of the following five statements is true:</p>
<ul>
<p>a) T1 and T2 are the same type, and that type is permissible as the component-type 
of a file-type (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>).</p>
<p>b) T1 is the real-type and T2 is the integer-type.</p>
<p>c) T1 and T2 are compatible ordinal-types, and the value of type T2 is in 
the closed intervalspecified by the type T1.</p>
<p>d) T1 and T2 are compatible set-types, and all the members of the value of 
type T2 are in the closed interval specified by the base-type of T1.</p>
<p>e) T1 and T2 are compatible string-types.</p>
</ul>
<p>At any place where the rule of assignment-compatibility is used</p>
<ul>
<p>a) it shall be an error if T1 and T2 are compatible ordinal-types and the 
value of type T2 is not in the closed interval specified by the type T1;</p>
<p>b) it shall be an error if T1 and T2 are compatible set-types and any member 
of the value of type T2 is not in the closed interval specified by the base-type of the type T1.</p>
</ul>
<p>At any place where the rule of assignment-compatibility is used to require 
a value of integer-type to be assignment-compatible with a real-type, an implicit integer-to-real conversion 
shall be performed.</p>
<h3><a name="6.4.7 Example of a type-definition-part">6.4.7 Example of a type-definition-part</a></h3>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> natural = 0..maxint;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> count = integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> range = integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> colour = (red, yellow, green, blue);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> sex = (male, female);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> year = 1900..1999;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> shape = (triangle, rectangle, circle);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> punchedcard = array [1..80] of char;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> charsequence = file of char;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> polar = record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">               r : real;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">           theta : angle</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">         end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> indextype = 1..limit;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> vector = array [indextype] of real;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> person = ^ persondetails;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> persondetails = record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  name, firstname : charsequence;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  age : natural;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  married : Boolean ;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  father, child, sibling : person;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  case s : sex of</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  male :</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                   (enlisted, bearded : Boolean);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  female :</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                   (mother, programmer : Boolean)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">               end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> FileOfInteger = file of integer;</pre>
<p>NOTE -- In the above example count, range, and integer denote the same type. The types denoted by year and natural are compatible with, but not the same as, the type denoted 
by range, count, and integer.</p>
<h2><a name="6.5 Declarations and denotations of variables">6.5 Declarations and denotations of variables</a></h2>
<h3><a name="6.5.1 Variable-declarations">6.5.1 Variable-declarations</a></h3>
<p>A variable shall be an entity to which a value can be attributed (see <b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b>). Each identifier in the identifier-list of a variable-declaration shall denote a distinct variable 
possessing the type denoted by the type-denoter of the variable-declaration.</p>
<ul>
<p>variable-declaration = identifier-list ' :' type-denoter .</p>
</ul>
<p>The occurrence of an identifier in the identifier-list of a variable-declaration 
of the variable-declarationpart of a block shall constitute its defining-point as a variable-identifier for 
the region that is the block. The structure of a variable possessing a structured-type shall 
be the structure of the structured-type. A use of a variable-access shall be an access, at the time 
of the use, to the variable thereby denoted. A variable-access, according to whether it is an entire-variable, 
a componentvariable, an identified-variable, or a buffer-variable, shall denote a declared variable, 
a component of a variable, a variable that is identified by a pointer value (see <b><a href="#6.4.4 Pointer-types">6.4.4</a></b>), 
or a buffer-variable, respectively.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">variable-access = entire-variable j component-variable j identified-variable</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                | buffer-variable.</pre>
</ul>
<p><i>Example of a variable-declaration-part:</i></p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x, y, z, max : real;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> i, j : integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> k : 0..9;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> p, q, r : Boolean;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> operator : (plus, minus, times);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> a : array [0..63] of real;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> c : colour;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> f : file of char;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> hue1, hue2 : set of colour;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> p1, p2 : person;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> m, m1, m2 : array [1..10, 1..10] of real;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> coord : polar;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> pooltape : array [1..4] of FileOfInteger;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"> date : record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">          month : 1..12;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">          year : integer</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">        end;</pre>
<p>NOTE -- Variables occurring in examples in the remainder of this International 
Standard should be assumed to have been declared as specified in the above example.</p>
<h3><a name="6.5.2 Entire-variables">6.5.2 Entire-variables</a></h3>
<ul>
<p>entire-variable = variable-identifier .</p>
<p>variable-identifier = identifier .</p>
</ul>
<h3><a name="6.5.3 Component-variables">6.5.3 Component-variables</a></h3>
<h4><a name="6.5.3.1 General">6.5.3.1 General</a></h4>
<p>A component of a variable shall be a variable. A component-variable shall 
denote a component of a variable. A reference or an access to a component of a variable shall 
constitute a reference or an access, respectively, to the variable. The value, if any, of the component 
of a variable shall be the same component of the value, if any, of the variable.</p>
<ul>
<p>component-variable = indexed-variable j field-designator .</p>
</ul>
<h4><a name="6.5.3.2 Indexed-variables">6.5.3.2 Indexed-variables</a></h4>
<p>A component of a variable possessing an array-type shall be denoted by an 
indexed-variable.</p>
<ul>
<p>indexed-variable = array-variable '[' index-expression, { ',' index-expression 
} ']'.</p>
<p>array-variable = variable-access.</p>
<p>index-expression = expression.</p>
</ul>
<p>An array-variable shall be a variable-access that denotes a variable possessing 
an array-type. For an indexed-variable closest-containing a single index-expression, the value 
of the index-expression shall be assignment-compatible with the index-type of the array-type. The component 
denoted by the indexed-variable shall be the component that corresponds to the value of 
the index-expression by the mapping of the type possessed by the array-variable (see <b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>).</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example 1:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">a[12]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">a[i + j]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">m[k]</pre>
</ul>
<p>If the array-variable is itself an indexed-variable, an abbreviation shall 
be permitted. In the abbreviated form, a single comma shall replace the sequence ] [ that occurs 
in the full form. The abbreviated form and the full form shall be equivalent. 
</p>
<p>The order of both the evaluation of the index-expressions of, and the access 
to the array-variable of, an indexed-variable shall be implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example 2:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">m[k][1]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">m[k, 1]</pre>
</ul>
<p>NOTE -- These two examples denote the same component-variable.</p>
<h4><a name="6.5.3.3 Field-designators">6.5.3.3 Field-designators</a></h4>
<p>A field-designator either shall denote that component of the record-variable 
of the field-designator associated (see <b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>) with the field-identifier of the field-specifier 
of the field-designator or shall denote the variable denoted by the field-designator-identifier (see <b><a href="#6.8.3.10 With-statements">6.8.3.10</a></b>) of the field-designator. A record-variable shall be a variable-access that denotes a variable possessing 
a record-type.</p>
<p>The occurrence of a record-variable in a field-designator shall constitute 
the defining-point of the field-identifiers associated with components of the record-type possessed 
by the record-variable, for the region that is the field-specifier of the field-designator.</p>
<ul>
<p>field-designator = record-variable '.' field-specifier j field-designator-identifier 
    .</p>
<p>record-variable = variable-access .</p>
<p>field-specifier = field-identifier .</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">Examples:</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">p2^.mother</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">coord.theta</p>
</ul>
<p>An access to a component of a variant of a variant-part, where the selector 
of the variant-part is not a field, shall attribute to the selector that value associated (see <b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>) with the variant. It shall be an error unless a variant is active for the entirety of each reference 
and access to each component of the variant.</p>
<p>When a variant becomes non-active, all of its components shall become totally-undefined.</p>
<p>NOTE -- If the selector of a variant-part is undefined, then no variant of 
the variant-part is active.</p>
<h3><a name="6.5.4 Identified-variables">6.5.4 Identified-variables</a></h3>
<p>An identified-variable shall denote the variable, if any, identified by the 
value of the pointer-variable of the identified-variable (see <b><a href="#6.4.4 Pointer-types">6.4.4</a></b> and <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b>) shall be accessible 
until the termination of the activation of the program-block or until the variable is made inaccessible 
(see the required procedure <b>dispose</b>, <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b>).</p>
<p>NOTE -- The accessibility of the variable also depends on the existence of 
a pointer-variable that has attributed to it the corresponding identifying-value.</p>
<p>A pointer-variable shall be a variable-access that denotes a variable possessing 
a pointer-type. It shall be an error if the pointer-variable of an identified-variable either denotes 
a nil-value or is undefined. It shall be an error to remove from the set of values of the pointer-type 
the identifying-value of an identified-variable (see <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b>) when a reference to the identified-variable 
exists.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p1fi</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p1f.fatherf</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p1's.sibling's.father's</pre>
</ul>
<h3><a name="6.5.5 Buffer-variables">6.5.5 Buffer-variables</a></h3>
<p>A file-variable shall be a variable-access that denotes a variable possessing 
a file-type. A buffervariable shall denote a variable associated with the variable denoted by the file-variable 
of the buffer-variable. A buffer-variable associated with a textfile shall possess 
the char-type; otherwise, a buffer-variable shall possess the component-type of the file-type possessed 
by the file-variable of the buffer-variable.</p>
<ul>
<p>buffer-variable = file-variable '^' .</p>
<p>file-variable = variable-access .</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">input^</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">pooltape[2]^</pre>
</ul>
<p>It shall be an error to alter the value of a file-variable f when a reference 
to the buffer-variable ff exists. A reference or an access to a buffer-variable shall constitute 
a reference or an access, respectively, to the associated file-variable.</p>
<h2><a name="6.6 Procedure and function declarations">6.6 Procedure and function declarations</a></h2>
<h3><a name="6.6.1 Procedure-declarations">6.6.1 Procedure-declarations</a></h3>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-declaration = procedure-heading ';' directive</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                      | procedure-identification ';' procedure-block</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                      | procedure-heading ';' procedure-block .</pre>
    <pre>procedure-heading = 'procedure' identifier [ formal-parameter-list ] .</pre>
    <pre>procedure-identification = 'procedure' procedure-identifier .</pre>
    <pre>procedure-identifier = identifier .</pre>
    <pre>procedure-block = block .</pre>
</ul>
<p>The occurrence of a formal-parameter-list in a procedure-heading of a procedure-declaration 
shall define the formal-parameters of the procedure-block, if any, associated with 
the identifier of the procedure-heading to be those of the formal-parameter-list.</p>
<p>The occurrence of an identifier in the procedure-heading of a procedure-declaration 
shall constitute its defining-point as a procedure-identifier for the region that is the block 
closest-containing the procedure-declaration.</p>
<p>Each identifier having a defining-point as a procedure-identifier in a procedure-heading 
of a procedure-declaration in which the directive <b>forward</b> occurs shall have exactly one of its applied 
occurrences in a procedure-identification of a procedure-declaration, and this applied 
occurrence shall be closestcontained by the procedure-and-function-declaration-part closest-containing the procedure-heading.</p>
<p>The occurrence of a procedure-block in a procedure-declaration shall associate 
the procedure-block with the identifier in the procedure-heading, or with the procedure-identifier 
in the procedureidentification, of the procedure-declaration.</p>
<p>There shall be at most one procedure-block associated with a procedure-identifier.</p>
<p><i>Examples of procedure-and-function-declaration-parts:</i></p>
<p>Example 1:</p>
<p>NOTE --- This example is not for level 0.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure AddVectors (var A, B, C : array [low..high : natural] of real);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  i : natural;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  for i := low to high do A[i] := B[i] + C[i]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end { of AddVectors };</pre>
</ul>
<p>Example 2:</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure readinteger (var f : text ; var x : integer);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     i : natural;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  while ff = ' ' do get(f);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {The buffer-variable contains the first non-space char}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  i := 0;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  while ff in [ ' 0 '.. ' 9 ' ] do begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     i := (10 * i) + (ord(f f) - ord( ' 0 ' ));</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     get(f)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {The buffer-variable contains a non-digit}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  x := i</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {Of course if there are no digits, x is zero}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure bisect (function f(x : real) : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                           a, b        : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                  var      result      : real);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> {This procedure attempts to find a zero of f(x) in (a,b) by</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  the method of bisection. It is assumed that the procedure is</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  called with suitable values of a and b such that</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      (f(a) &lt; 0) and (f(b) &gt;= 0)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  The estimate is returned in the last parameter.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> const</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   eps = 1e-10;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   midpoint : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {The invariant P is true by calling assumption}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  midpoint := a;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  while abs(a - b) &gt; eps * abs(a) do begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   midpoint := (a + b) / 2;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   if f(midpoint) &lt; 0 then a := midpoint</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   else b := midpoint</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {Which re-establishes the invariant:</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     P = (f(a) &lt; 0) and (f(b) &gt;= 0)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   and reduces the interval (a,b) provided that the</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   value of midpoint is distinct from both a and b.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {P together with the loop exit condition assures that a zero</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   is contained in a small subinterval. Return the midpoint as</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   the zero.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  result := midpoint</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure PrepareForAppending (var f : FileOfInteger);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">{ This procedure takes a file in any state suitable for reset and</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  places it in a condition for appending data to its end. Simpler</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  conditioning is only possible if assumptions are made about the</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  initial state of the file. }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  LocalCopy : FileOfInteger;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  procedure CopyFiles (var from, into : FileOfInteger);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    reset(from) ; rewrite(into);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    while not eof(from) do begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    into' := from';</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    put(into) ; get(from)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end { of CopyFiles };</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin { of body of PrepareForAppending }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  CopyFiles(f, LocalCopy);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  CopyFiles(LocalCopy, f)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end { of PrepareForAppending };</pre>
</ul>
<h3><a name="6.6.2 Function-declarations">6.6.2 Function-declarations</a></h3>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-declaration = function-heading ';' directive</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                     | function-identification ' ;' function-block</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                     | function-heading ' ;' function-block .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-heading = 'function' identifier [ formal-parameter-list ] ';' result-type .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-identification = 'function' function-identifier .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-identifier = identifier .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">result-type = simple-type-identifier | pointer-type-identifier .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-block = block.</pre>
</ul>
<p>The occurrence of a formal-parameter-list in a function-heading of a function-declaration 
shall define the formal-parameters of the function-block, if any, associated with the 
identifier of the function-heading to be those of the formal-parameter-list. The function-block shall contain 
at least one assignment-statement such that the function-identifier of the assignment-statement 
is associated with the block (see <b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b>).</p>
<p>The occurrence of an identifier in the function-heading of a function-declaration 
shall constitute its defining-point as a function-identifier associated with the result type denoted 
by the result-type for the region that is the block closest-containing the function-declaration.</p>
<p>Each identifier having a defining-point as a function-identifier in the function-heading 
of a function-declaration in which the directive <b>forward</b> occurs shall have exactly one of its applied 
occurrences in a function-identification of a function-declaration, and this applied 
occurrence shall be closestcontained by the procedure-and-function-declaration-part closest-containing the function-heading.</p>
<p>The occurrence of a function-block in a function-declaration shall associate 
the function-block with the identifier in the function-heading, or with the function-identifier in 
the function-identification, of the function-declaration ; the block of the function-block shall be associated 
with the result type that is associated with the identifier or function-identifier.</p>
<p>There shall be at most one function-block associated with a function-identifier.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example of a procedure-and-function-declaration-part:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function Sqrt (x : real) : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">{This function computes the square root of x (x &gt; 0) using Newton's</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> method.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  old, estimate : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> estimate := x;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> repeat</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   old := estimate;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   estimate := (old + x / old) * 0.5;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> until abs(estimate - old) &lt; eps * estimate;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> {eps being a global constant}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> Sqrt := estimate</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end { of Sqrt };</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function max (a : vector) : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">{This function finds the largest component of the value of a.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  largestsofar : real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  fence : indextype;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> largestsofar := a[1];</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> {Establishes largestsofar = max(a[1])}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> for fence := 2 to limit do begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   if largestsofar &lt; a[fence] then largestsofar := a[fence]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   {Re-establishing largestsofar = max(a[1],... ,a[fence]) l</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> {So now largestsofar = max(a[1],... ,a[limit]) l</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> max := largestsofar</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end { of max };</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function GCD (m, n : natural) : natural;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  if n=0 then GCD := m else GCD := GCD(n, m mod n);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">{The following two functions analyze a parenthesized expression and</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> convert it to an internal form. They are declared forward</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> since they are mutually recursive, i.e., they call each other.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> These function-declarations use the following identifiers that are not</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> defined in this International Standard : formula, IsOpenParenthesis, IsOperator,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> MakeFormula, nextsym, operation, ReadElement, ReadOperator, and</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> SkipSymbol. }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function ReadExpression : formula ; forward;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function ReadOperand : formula ; forward ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function ReadExpression ; {See forward declaration of heading.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  this : formula;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  op : operation;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> this := ReadOperand;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> while IsOperator(nextsym) do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   op := ReadOperator;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   this := MakeFormula(this, op, ReadOperand);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> ReadExpression := this</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function ReadOperand ; {See forward declaration of heading.}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if IsOpenParenthesis(nextsym) then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  SkipSymbol;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  ReadOperand := ReadExpression;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  {nextsym should be a close-parenthesis}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  SkipSymbol</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> else ReadOperand := ReadElement</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
</ul>
<h3><a name="6.6.3 Parameters">6.6.3 Parameters</a></h3>
<h4><a name="6.6.3.1 General">6.6.3.1 General</a></h4>
<p>The identifier-list in a value-parameter-specification shall be a list of 
value parameters. The identifier-list in a variable-parameter-specification shall be a list of variable parameters.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">formal-parameter-list = '(' formal-parameter-section { ';' formal-parameter-section } ')' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">formal-parameter-section &gt; value-parameter-specification</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         | variable-parameter-specification</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         | procedural-parameter-specification</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         | functional-parameter-specification .</pre>
</ul>
<p>NOTE -- 1 There is also a syntax rule for formal-parameter-section in <b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b>.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">value-parameter-specification = identifier-list ':' type-identifier .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">variable-parameter-specification = 'var' identifier-list ':' type-identifier .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedural-parameter-specification = procedure-heading .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">functional-parameter-specification = function-heading .</pre>
</ul>
<p>An identifier defined to be a parameter-identifier for the region that is 
the formal-parameter-list of a procedure-heading shall be designated a formal-parameter of the block of 
the procedure-block, if any, associated with the identifier of the procedure-heading. An identifier 
defined to be a parameteridentifier for the region that is the formal-parameter-list of a function-heading shall 
be designated a formal-parameter of the block of the function-block, if any, associated 
with the identifier of the function-heading.</p>
<p>The occurrence of an identifier in the identifier-list of a value-parameter-specification 
or a variable-parameter-specification shall constitute its defining-point as a parameter-identifier 
for the region that is the formal-parameter-list closest-containing it, and its defining-point 
as the associated variable-identifier for the region that is the block, if any, of which it is a formal-parameter.</p>
<p>The occurrence of the identifier of a procedure-heading in a procedural-parameter-specification 
shall constitute its defining-point as a parameter-identifier for the region that 
is the formal-parameter-list closest-containing it, and its defining-point as the associated procedure-identifier 
for the region that is the block, if any, of which it is a formal-parameter.</p>
<p>The occurrence of the identifier of a function-heading in a functional-parameter-specification 
shall constitute its defining-point as a parameter-identifier for the region that 
is the formal-parameter-list closest-containing it, and its defining-point as the associated function-identifier 
for the region that is the block, if any, of which it is a formal-parameter.</p>
<p>NOTE -- 2 If the formal-parameter-list is contained in a procedural-parameter-specification 
or a functional-parameter- specification, there is no corresponding procedure-block or function-block.</p>
<h4><a name="6.6.3.2 Value parameters">6.6.3.2 Value parameters</a></h4>
<p>The formal-parameter and its associated variable-identifier shall denote 
the same variable. The formal-parameter shall possess the type denoted by the type-identifier of 
the value-parameterspecification. The type possessed by the formal-parameter shall be one that is permitted 
as the component-type of a file-type (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>). The actual-parameter (see 
<b><a href="#6.7.3 Function-designators">6.7.3</a></b> and <b><a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b>) shall be an expression whose value is assignment-compatible with the type possessed 
by the formal-parameter. The current value of the expression shall be attributed upon activation of 
the block to the variable that is denoted by the formal-parameter.</p>
<h4><a name="6.6.3.3 Variable parameters">6.6.3.3 Variable parameters</a></h4>
<p>The actual-parameter shall be a variable-access. The type possessed by the 
actual-parameters shall be the same as that denoted by the type-identifier of the variable-parameter-specification, 
and the formal-parameters shall also possess that type. The actual-parameter shall 
be accessed before the activation of the block, and this access shall establish a reference to the 
variable thereby accessed during the entire activation of the block ; the corresponding formal-parameter 
and its associated variable-identifier shall denote the referenced variable during the activation.</p>
<p>An actual variable parameter shall not denote a field that is the selector 
of a variant-part. An actual variable parameter shall not denote a component of a variable where that 
variable possesses a type that is designated packed.</p>
<h4><a name="6.6.3.4 Procedural parameters">6.6.3.4 Procedural parameters</a></h4>
<p>The actual-parameter (see <b><a href="#6.7.3 Function-designators">6.7.3</a></b> and <b><a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b>) shall be a procedure-identifier 
that has a definingpoint contained by the program-block. The formal-parameter-list, if any, closest-contained 
by the formal-parameter-section and the formal-parameter-list, if any, that defines 
the formal-parameters of the procedure denoted by the actual-parameter shall be congruous, or neither 
formal-parameter-list shall occur. The formal-parameter and its associated procedure-identifier 
shall denote the actualparameter during the entire activation of the block.</p>
<h4><a name="6.6.3.5 Functional parameters">6.6.3.5 Functional parameters</a></h4>
<p>The actual-parameter (see <b><a href="#6.7.3 Function-designators">6.7.3</a></b> and <b><a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b>) shall be a function-identifier 
that has a defining-point contained by the program-block. The formal-parameter-list, if any, closest-contained 
by the formalparameter-section and the formal-parameter-list, if any, that defines the formal-parameters 
of the function denoted by the actual-parameter shall be congruous, or neither formal-parameter-list 
shall occur. The result-type closest-contained by the formal-parameter-section 
shall denote the same type as the result type of the function. The formal-parameter and its associated 
function-identifier shall denote the actual-parameter during the entire activation of the block.</p>
<h4><a name="6.6.3.6 Parameter list congruity">6.6.3.6 Parameter list congruity</a></h4>
<p>Two formal-parameter-lists shall be congruous if they contain the same number 
of formal-parametersections and if the formal-parameter-sections in corresponding positions match. Two 
formalparameter-sections shall match if any of the following statements is true.</p>
<ul>
<p>a) They are both value-parameter-specifications containing the same number 
of parameters and the type-identifier in each value-parameter-specification denotes the same 
type.</p>
<p>b) They are both variable-parameter-specifications containing the same number 
of parameters and the type-identifier in each variable-parameter-specification denotes 
the same type.</p>
<p>c) They are both procedural-parameter-specifications and the formal-parameter-lists 
of the procedure-headings thereof are congruous.</p>
<p>d) They are both functional-parameter-specifications, the formal-parameter-lists 
of the functionheadings thereof are congruous, and the type-identifiers of the result-types of the 
functionheadings thereof denote the same type.</p>
<p><font color="red">e) They are either both value-conformant-array-specifications or both variable-conformant-arrayspecifications; 
and in both cases the conformant-array-parameter-specifications contain the 
same number of parameters and equivalent conformant-array-schemas. Two conformant-arrayschemas 
shall be equivalent if all of the following four statements are true.</font></p>
    <ul>
<p><font color="red">1) There is a single index-type-specification in each conformant-array-schema.</font></p>
<p><font color="red">2) The ordinal-type-identifier in each index-type-specification denotes the 
same type.</font></p>
<p><font color="red">3) Either the (component) conformant-array-schemas of the conformant-array-schemas 
are equivalent or the type-identifiers of the conformant-array-schemas denote 
the same type.</font></p>
<p><font color="red">4) Either both conformant-array-schemas are packed-conformant-array-schemas 
or both are unpacked-conformant-array-schemas.</font></p>
    </ul>
</ul>
<p><font color="red">NOTES</font></p>
<p><font color="red">1 The abbreviated conformant-array-schema and its corresponding full form 
are equivalent (see </font><b><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a></b><font color="red">).</font></p>
<p><font color="red">2 For the status of item e) above see </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> a</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> b</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> c</font></b><font color="red">), </font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> a</font></b><font color="red">), 
and </font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> b</font></b><font color="red">). </font></p>
<h4><a name="6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7 Conformant array parameters</font></a></h4>
<p><font color="red">NOTE -- For the status of this subclause see </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> a</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> b</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> c</font></b><font color="red">), </font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> a</font></b><font color="red">), and </font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> b</font></b><font color="red">).</font></p>
<h5><a name="6.6.3.7.1 General"><font color="red">6.6.3.7.1 General</font></a></h5>
<p><font color="red">The occurrence of an identifier in the identifier-list contained by a conformant-array-parameterspecification 
shall constitute its defining-point as a parameter-identifier for the region 
that is the formal-parameter-list closest-containing it and its defining-point as the 
associated variable-identifier for the region that is the block, if any, of which it is a formal-parameter. A variable-identifier so defined shall be designated a conformant-array-parameter.</font></p>
<p><font color="red">The occurrence of an identifier in an index-type-specification shall constitute 
its defining-point as a bound-identifier for the region that is the formal-parameter-list closest-containing 
it and for the region that is the block, if any, whose formal-parameters are specified by 
that formal-parameter-list.</font></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">formal-parameter-section &gt; conformant-array-parameter-specification .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">conformant-array-parameter-specification = value-conformant-array-specification</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                                         | variable-conformant-array-specification .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">value-conformant-array-specification = identifier-list ':' conformant-array-schema .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">variable-conformant-array-specification = 'var' identifier-list ':' conformant-array-schema .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">conformant-array-schema = packed-conformant-array-schema</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                        | unpacked-conformant-array-schema .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">packed-conformant-array-schema = 'packed' 'array' '[' index-type-specification ']'</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                                 'of' type-identifier .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">unpacked-conformant-array-schema =</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">               'array' '[' index-type-specification { ';' index-type-specification } ']'</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">               'of' ( type-identifier j conformant-array-schema ) .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">index-type-specification = identifier '..' identifier ' :' ordinal-type-identifier .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">factor &gt; bound-identifier .</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">bound-identifier = identifier .</font></pre>
</ul>
<p><font color="red">NOTE -- 1 There are also syntax rules for formal-parameter-section in </font><b><a href="#6.6.3.1 General"><font color="red">6.6.3.1</font></a></b><font color="red"> and for factor in </font><b><a href="#6.7.1 General"><font color="red">6.7.1</font></a></b><font color="red">.</font></p>
<p><font color="red">If a conformant-array-schema closest-contains a conformant-array-schema, 
then an abbreviated form of definition shall be permitted. In the abbreviated form, a single semicolon 
shall replace the sequence ] of array [ that occurs in the full form. The abbreviated form and the 
full form shall be equivalent.</font></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i><font color="red">Examples:</font></i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">array [u..v : T1] of array [j..k : T2] of T3</font></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">array [u..v : T1 ; j..k : T2] of T3</font></pre>
</ul>
<p><font color="red">Within the activation of the block, applied occurrences of the first identifier 
of an index-typespecification shall denote the smallest value specified by the corresponding index-type 
(see </font><b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b><font color="red">) possessed by the actual-parameter, and applied occurrences of the second 
identifier of the indextype-specification shall denote the largest value specified by that index-type.</font></p>
<p><font color="red">NOTE -- 2 The object denoted by a bound-identifier is neither a constant nor 
a variable.</font></p>
<p><font color="red">The actual-parameters (see </font><b><a href="#6.7.3 Function-designators"><font color="red">6.7.3</font></a></b><font color="red"> and </font><b><a href="#6.8.2.3 Procedure-statements"><font color="red">6.8.2.3</font></a></b><font color="red">) corresponding to formal-parameters 
that occur in a single conformant-array-parameter-specification shall all possess the same 
type. The type possessed by the actual-parameters shall be conformable (see </font><b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b><font color="red">) with the conformant-array-schema, 
and the formal-parameters shall possess an array-type which shall be distinct 
from any other type and which shall have a component-type that shall be the fixed-component-type 
of the conformantarray-parameters defined in the conformant-array-parameter-specification and that 
shall have the index-types of the type possessed by the actual-parameters that correspond 
(see </font><b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b><font color="red">) to the index-type-specifications contained by the conformant-array-schema contained 
by the conformantarray-parameter-specification. The type denoted by the type-identifier contained 
by the conformantarray-schema contained by a conformant-array-parameter-specification shall be designated 
the fixedcomponent-type of the conformant-array-parameters defined by that conformant-array-parameterspecification.</font></p>
<p><font color="red">NOTE -- 3 The type possessed by the formal-parameter cannot be a string-type 
(see 6.4.3.2) because it is not denoted by an array-type.</font></p>
<h5><a name="6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2 Value conformant arrays</font></a></h5>
<p><font color="red">The identifier-list in a value-conformant-array-specification shall be a 
list of value conformant arrays. Each actual-parameter corresponding to a value formal-parameter shall be 
an expression. The value of the expression shall be attributed before activation of the block to an 
auxiliary variable that the program does not otherwise contain. The type possessed by this variable 
shall be the same as that possessed by the expression. This variable shall be accessed before the 
activation of the block, and this access shall establish a reference to the variable thereby accessed 
during the entire activation of the block ; the corresponding formal-parameter and its associated variable-identifier 
shall represent the referenced variable during the activation. The fixed-component-type 
of a value conformant array shall be one that is permitted as the component-type of a file-type.</font></p>
<p><font color="red">If the actual-parameter contains an occurrence of a conformant-array-parameter, 
then for each occurrence of the conformant-array-parameter contained by the actual-parameter, 
either </font></p>
<ul>
<p><font color="red">a) the occurrence of the conformant-array-parameter shall be contained by 
a function-designator contained by the actual-parameter ; or</font></p>
<p><font color="red">b) the occurrence of the conformant-array-parameter shall be contained by 
an indexed-variablecontained by the actual-parameter, such that the type possessed by that indexed-variable 
is the fixed-component-type of the conformant-array-parameter.</font></p>
</ul>
<p><font color="red">NOTE -- This ensures that the type possessed by the expression and the auxiliary 
variable will always be known and that, as a consequence, the activation record of a procedure can 
be of a fixed size.</font></p>
<h5><a name="6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3 Variable conformant arrays</font></a></h5>
<p><font color="red">The identifier-list in a variable-conformant-array-specification shall be 
a list of variable conformant arrays. The actual-parameter shall be a variable-access. The actual-parameter 
shall be accessed before the activation of the block, and this access shall establish a reference 
to the variable thereby accessed during the entire activation of the block ; the corresponding formal-parameter 
and its associated variable-identifier shall denote the referenced variable during 
the activation.</font></p>
<p><font color="red">An actual-parameter shall not denote a component of a variable where that 
variable possesses a type that is designated packed.</font></p>
<h4><a name="6.6.3.8 Conformability"><font color="red">6.6.3.8 Conformability</font></a></h4>
<p><font color="red">NOTE -- 1 For the status of this subclause see </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> a</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> b</font></b><font color="red">), </font><b><a href="#5.1 Processors"><font color="red">5.1</font></a><font color="red"> c</font></b><font color="red">), 
</font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> a</font></b><font color="red">), and </font><b><a href="#5.2 Programs"><font color="red">5.2</font></a><font color="red"> b</font></b><font color="red">).</font></p>
<p><font color="red">Given a type denoted by an array-type closest-containing a single index-type 
and a conformantarray- schema closest-containing a single index-type-specification, then the index-type 
and the indextype- specification shall be designated as corresponding. Given two conformant-array-schemas 
closestcontaining a single index-type-specification, then the two index-type-specifications 
shall be designated as corresponding. Let T1 be an array-type with a single index-type and let 
T2 be the type denoted by the ordinal-type-identifier of the index-type-specification of a conformant-array-schema 
closestcontaining a single index-type-specification ; then T1 shall be conformable with the 
conformant-array-schema if all the following four statements are true.</font></p>
<ul>
<p><font color="red">a) The index-type of T1 is compatible with T2.</font></p>
<p><font color="red">b) The smallest and largest values specified by the index-type of T1 lie 
within the closed interval specified by T2.</font></p>
<p><font color="red">c) The component-type of T1 denotes the same type as that denoted by the 
type-identifier of the conformant-array-schema or is conformable to the conformant-array-schema 
in the conformantarray-schema.</font></p>
<p><font color="red">d) Either T1 is not designated packed and the conformant-array-schema is 
an unpacked-conformantarray-schema, or T1 is designated packed and the conformant-array-schema is a packedconformant-array-schema.</font></p>
</ul>
<p><font color="red">NOTE -- 2 The abbreviated and full forms of a conformant-array-schema are 
equivalent (see </font><b><a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a></b><font color="red">). The abbreviated and full forms of an array-type are equivalent (see </font><b><a href="#6.4.3.2 Array-types"><font color="red">6.4.3.2</font></a></b><font color="red">).</font></p>
<p><font color="red">At any place where the rule of conformability is used, it shall be an error 
if the smallest or largest value specified by the index-type of T1 lies outside the closed interval 
specified by T2.</font></p>
<h3><a name="6.6.4 Required procedures and functions">6.6.4 Required procedures and functions</a></h3>
<p>The required procedure-identifiers and function-identifiers and the corresponding 
required procedures and functions shall be as specified in <b><a href="#6.6.5 Required procedures">6.6.5</a></b>, <b><a href="#6.6.6 Required functions">6.6.6</a></b>, and <b><a href="#6.9 Input and output">6.9</a></b>.</p>
<p>NOTE -- Required procedures and functions do not necessarily follow the rules 
given elsewhere for procedures and functions.</p>
<h3><a name="6.6.5 Required procedures">6.6.5 Required procedures</a></h3>
<h4><a name="6.6.5.1 General">6.6.5.1 General</a></h4>
<p>The required procedures shall be file handling procedures, dynamic allocation 
procedures and transfer procedures.</p>
<h4><a name="6.6.5.2 File handling procedures">6.6.5.2 File handling procedures</a></h4>
<p>Except for the application of <b>rewrite</b> or <b>reset</b> to the program parameters 
denoted by <b>input</b> or <b>output</b>, the effects of applying each of the file handling procedures <b>rewrite</b>, 
<b>put</b>, <b>reset</b>, and <b>get</b> to a file-variable f shall be defined by pre-assertions and post-assertions 
about f, its components f.L, f.R, and f.M, and the associated buffer-variable f^. The use of the 
variable f0 within an assertion shall be considered to represent the state or value, as appropriate, of f 
prior to the operation, while f (within an assertion) shall denote the variable after the operation, and 
similarly for f0^ and f^.</p>
<p>It shall be an error if the stated pre-assertion does not hold immediately 
prior to any use of the defined operation. It shall be an error if any variable explicitly denoted 
in an assertion of equality is undefined. The post-assertion shall hold prior to the next subsequent 
access to the file, its components, or its associated buffer-variable. The post-assertions imply 
corresponding activities on the external entities, if any, to which the file-variables are bound. These 
activities, and the point at which they are actually performed, shall be implementation-defined.</p>
<p>NOTE -- In order to facilitate interactive terminal input and output, the 
procedure get (and other input procedures) should be performed at the latest opportunity, and the procedure 
put (and other output procedures) should be performed at the first opportunity. This technique 
has been called 'lazy I/O'.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">rewrite(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">pre-assertion : true.</p>
<p>post-assertion : (f.L = f.R = S( )) and (f.M = Generation) and (f^ is totally-undefined).</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">put(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">pre-assertion : (f0.M = Generation) and (f0.L is not undefined) and (f0.R = S( )) and 
    (f0^ is not undefined).</p>
<p>post-assertion : (f.M = Generation) and (f.L = (f0.L ~ S(f0^)) ) and (f.R 
= S( )) and (f^ is totally-undefined).</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">reset(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">pre-assertion : The components f0.L and f0.R are not undefined.</p>
<p>post-assertion : (f.L = S( )) and (f.R = (f0.L ~ f0.R ~X)) and (f.M = Inspection) and 
    (if f.R = S( ) then (ff is totally-undefined) else (ff = f.R.first)),</p>
<p>where, if f possesses the type denoted by the required type-identifier text 
and if f0.L ~ f0.R is not empty and if (f0.L ~ f0.R).last is not an end-of-line, then X shall 
be a sequence having an end-of-line component as its only component ; otherwise, X = S( ).</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">get(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">pre-assertion : (f0.M = Inspection) and (neither f0.L nor f0.R is undefined) 
and (f0.R &lt;&gt; S( )).</p>
<p>post-assertion : (f.M = Inspection) and (f.L = (f0.L ~ S(f0.R.first))) 
and (f.R = f0.R.rest) and (if f.R = S( ) then (ff is totally-undefined) else (ff= f.R.first)).</p>
</ul>
<p>When the file-variable f possesses a type other than that denoted by text, 
the required procedures read and write shall be defined as follows.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">read</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">Let f denote a file-variable and v l,...,vn denote variable-accesses (n&gt; 
=2) ; then the procedure-statement read(f,v l ,...,v n) shall access the file-variable and establish a reference 
to that filevariable for the remaining execution of the statement. The execution of the statement 
shall be equivalent to</p>
    <ul>
        <pre>begin read(ff,v l ) ; read(ff,v 2 ,...,v n) end</pre>
    </ul>
<p>where ff denotes the referenced file-variable.</p>
<p>Let f be a file-variable and v be a variable-access ; then the procedure-statement 
read(f,v) shall access the file-variable and establish a reference to that file-variable 
for the remaining execution of the statement. The execution of the statement shall be equivalent to</p>
    <ul>
        <pre>begin v := ff^; get(ff) end</pre>
    </ul>
<p>where ff denotes the referenced file-variable.</p>
<p>NOTE -- The variable-access is not a variable parameter. Consequently, it 
may be a component of a packed structure, and the value of the buffer-variable need only be assignment-compatible 
with it.</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">write</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">Let f denote a file-variable and e l,...,en denote expressions (n&gt; 
=2) ; then the procedurestatement write(f,e l ,...,e n ) shall access the file-variable and establish a 
reference to that file-variable for the remaining execution of the statement. The execution of 
the statement shall be equivalent to</p>
    <ul>
        <pre>begin write(ff,e l ) ; write(ff,e 2 ,...,e n) end</pre>
    </ul>
<p>where ff denotes the referenced file-variable.</p>
<p>Let f be a file-variable and e be an expression ; then the procedure-statement 
write(f,e) shall access the file-variable and establish a reference to that file-variable 
for the remaining execution of the statement. The execution of the write statement shall be equivalent 
to</p>
    <ul>
        <pre>begin ff^ := e ; put(ff) end</pre>
    </ul>
<p>where ff denotes the referenced file-variable.</p>
<p>NOTES</p>
<p>1 The required procedures <b>read</b>, <b>write</b>, <b>readln</b>, <b>writeln</b>, and <b>page</b>, as applied 
to textfiles, are described in <b><a href="#6.10 Programs">6.10</a></b>.</p>
<p>2 Since the definitions of read and write include the use of get and put, 
the implementation-defined aspects of their post-assertions also apply.</p>
<p>3 A consequence of the definition of read and write is that the non-file 
parameters are evaluated in a left-to-right order.</p>
</ul>
<h4><a name="6.6.5.3 Dynamic allocation procedures">6.6.5.3 Dynamic allocation procedures</a></h4>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">new(p)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">shall create a new variable that is totally-undefined, shall create a new 
identifying-value of the pointer-type associated with p, that identifies the new variable, and 
shall attribute this identifying-value to the variable denoted by the variable-access p. The 
created variable shall possess the type that is the domain-type of the pointer-type possessed by 
p.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">new(p,c l ,...,cn)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">shall create a new variable that is totally-undefined, shall create a new 
identifying-value of the pointer-type associated with p, that identifies the new variable, and 
shall attribute this identifying-value to the variable denoted by the variable-access p. The 
created variable shall possess the record-type that is the domain-type of the pointer-type possessed 
by p and shall have nested variants that correspond to the case-constants c l,...,cn. The case-constants shall be listed in order of increasing nesting of the variant-parts. Any variant 
not specified shall be at a deeper level of nesting than that specified by cn.</p>
<p>It shall be an error if a variant of a variant-part within the new variable 
is active and a different variant of the variant-part is one of the specified variants.</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">dispose(q)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">shall remove the identifying-value denoted by the expression q from the pointer-type 
of q. It shall be an error if the identifying-value had been created using the form 
new(p,c l ,...,cn).</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">dispose(q,kl ,...,km)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">shall remove the identifying-value denoted by the expression q from the pointer-type 
of q. The case-constants k 1,...,km shall be listed in order of increasing nesting 
of the variant-parts. It shall be an error unless the variable had been created using the form new(p,c 
1 ,...,cn ) and m is equal to n. It shall be an error if the variants in the variable identified 
by the pointer value of q are different from those specified by the values denoted by the case-constants 
k 1,...,km.</p>
</ul>
<p>NOTE -- The removal of an identifying-value from the pointer-type to which 
it belongs renders the identifiedvariable inaccessible (see <b><a href="#6.5.4 Identified-variables">6.5.4</a></b>) and makes undefined all variables and functions 
that have that value attributed (see <b><a href="#6.6.3.2 Value parameters">6.6.3.2</a></b> and <b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b>).</p>
<p>It shall be an error if q has a nil-value or is undefined.</p>
<p>It shall be an error if a variable created using the second form of new is 
accessed by the identifiedvariable of the variable-access of a factor, of an assignment-statement, or of an 
actual-parameter.</p>
<h4><a name="6.6.5.4 Transfer procedures">6.6.5.4 Transfer procedures</a></h4>
<p>In the statement pack(a,i,z) and in the statement unpack(z,a,i) the following 
shall hold : a and z shall be variable-accesses ; a shall possess an array-type not designated 
packed ; z shall possess an array-type designated packed ; the component-types of the types of a and 
z shall be the same ; and the value of the expression i shall be assignment-compatible with the index-type 
of the type of a.</p>
<p>Let j and k denote auxiliary variables that the program does not otherwise 
contain and that have the type that is the index-type of the type of z and a, respectively. Let u 
and v denote the smallest and largest values of the index-type of the type of z. Each of the statements 
pack(a,i,z) and unpack(z,a,i) shall establish references to the variables denoted by a and z for the remaining 
execution of the statements ; let aa and zz, respectively, denote the referenced variables 
within the following sentence. Then the statement pack(a,i,z) shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">k := i;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for j := u to v do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> zz[j] := aa[k];</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if j &lt;&gt; v then k := succ(k)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<p>and the statement unpack(z,a,i) shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">k := i;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for j := u to v do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> aa[k] := zz[j];</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if j &lt;&gt; v then k := succ(k)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<p>NOTE -- Errors will arise if the references cannot be established, if one 
or more of the values attributed to j is not assignment-compatible with the index-type of the type of a, or if 
an evaluated array component is undefined.</p>
<h3><a name="6.6.6 Required functions">6.6.6 Required functions</a></h3>
<h4><a name="6.6.6.1 General">6.6.6.1 General</a></h4>
<p>The required functions shall be arithmetic functions, transfer functions, 
ordinal functions, and Boolean functions.</p>
<h4><a name="6.6.6.2 Arithmetic functions">6.6.6.2 Arithmetic functions</a></h4>
<p>For the following arithmetic functions, the expression x shall be either 
of real-type or integer-type. For the functions abs and sqr, the type of the result shall be the same as 
the type of the parameter, x. For the remaining arithmetic functions, the result shall always be of 
real-type. The result shall be as shown in table 2.</p>
<h3 align="center" style="line-height:100%; margin-top:0; margin-bottom:0;">Table 2 -- Arithmetic function results</h3>
<table border="1" style="line-height:100%; margin-top:0; margin-bottom:0;">
    <tr>
        <td width="416">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Function</h3>
        </td>
        <td width="416">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Result</h3>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">abs(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">absolute value of x</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">sqr(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">square of x</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It shall be an error if such a value does not exist.</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">sin(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">sine of x, where x is in radians</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">cos(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">cosine of x, where x is in radians</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">exp(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">base of natural logarithms raised to the power x</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">ln(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">natural logarithm of x, if x is greater than zero</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It shall be an error if x is not greater than zero.</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">sqrt(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">non-negative square root of x, if x is not negative</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It shall be an error if x is negative.</p>
        </td>
    </tr>
    <tr>
        <td width="416">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">arctan(x)</p>
        </td>
        <td width="416"><p style="line-height:100%; margin-top:0; margin-bottom:0;">principal value, in radians, of the arctangent of x</p>
        </td>
    </tr>
</table>
<h4><a name="6.6.6.3 Transfer functions">6.6.6.3 Transfer functions</a></h4>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">trunc(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of real-type, this function shall return 
a result of integertype. The value of trunc(x) shall be such that if x is positive or zero, then 
0 &lt;x-trunc(x) &lt; 1; otherwise, - 1&lt;x-trunc(x) &lt;0. It shall be an error if such a value 
does not exist.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  trunc(3.5)  {yields 3}</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  trunc(-3.5) {yields -3}</pre>
    </ul>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">round(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of real-type, this function shall return 
a result of integertype. If x is positive or zero, round(x) shall be equivalent to trunc(x+0.5) 
; otherwise, round(x) shall be equivalent to trunc(x-0.5). It shall be an error if such a value 
does not exist.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  round(3.5)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  fyields 4g</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  round(-3.5)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  fyields -4g</pre>
    </ul>
</ul>
<h4><a name="6.6.6.4 Ordinal functions">6.6.6.4 Ordinal functions</a></h4>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">ord(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of an ordinal-type, this function shall 
return a result of integer-type that shall be the ordinal number (see <b>6.4.2.2</b> and <b>6.4.2.3</b>) of the value of the expression x.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">chr(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of integer-type, this function shall 
return a result of chartype that shall be the value whose ordinal number is equal to the value of the 
expression x, if such a character value exists. It shall be an error if such a character 
value does not exist. For any value, ch, of char-type, it shall be true that</p>
    <ul>
<p>chr(ord(ch)) = ch</p>
    </ul>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">succ(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of an ordinal-type, this function shall 
return a result that shall be of the same type as that of the expression (see <b>6.7.1</b>). The function 
shall yield a value whose ordinal number is one greater than that of the expression x, if such 
a value exists. It shall be an error if such a value does not exist.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">pred(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of an ordinal-type, this function shall 
return a result that shall be of the same type as that of the expression (see <b>6.7.1</b>). The function 
shall yield a value whose ordinal number is one less than that of the expression x, if such a 
value exists. It shall be an error if such a value does not exist.</p>
</ul>
<h4><a name="6.6.6.5 Boolean functions">6.6.6.5 Boolean functions</a></h4>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">odd(x)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">From the expression x that shall be of integer-type, this function shall 
be equivalent to the expression</p>
    <ul>
<p>(abs(x) mod 2 = 1).</p>
    </ul>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">eof(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The parameter f shall be a file-variable ; if the actual-parameter-list is 
omitted, the function shall be applied to the required textfile <b>input</b> (see <b><a href="#6.10 Programs">6.10</a></b>) and the program 
shall contain a program-parameter-list containing an identifier with the spelling input. When eof(f) is activated, it shall be an error if f is undefined ; otherwise, the function 
shall yield the valuetrue if f.R is the empty sequence (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>); otherwise, false.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">eoln(f)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The parameter f shall be a textfile ; if the actual-parameter-list is omitted, 
the function shall be applied to the required textfile <b>input</b> (see 6.10) and the program shall 
contain a program-parameter-list containing an identifier with the spelling input. When eoln(f) 
is activated, it shall be an error if f is undefined or if eof(f) is true ; otherwise, the 
function shall yield the value true if f.R.first is an end-of-line component (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>) ; otherwise, 
false.</p>
</ul>
<h2><a name="6.7 Expressions">6.7 Expressions</a></h2>
<h3><a name="6.7.1 General">6.7.1 General</a></h3>
<p>An expression shall denote a value. The use of a variable-access as a factor 
shall denote the value, if any, attributed to the variable accessed thereby. When a factor 
is used, it shall be an error if the variable denoted by a variable-access of the factor is undefined. Operator precedences shall be according to four classes of operators as follows. The operator 
not shall have the highest precedence, followed by the multiplying-operators, then the adding-operators 
and signs, and finally, with the lowest precedence, the relational-operators. Sequences of two or 
more operators of the same precedence shall be left associative.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">expression = simple-expression [ relational-operator simple-expression ] .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">simple-expression = [ sign ] term { adding-operator term } .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">term = factor { multiplying-operator factor } .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">factor &gt; variable-access | unsigned-constant | function-designator</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">       | set-constructor | '(' expression ')' | 'not' factor .</pre>
</ul>
<p>NOTE -- 1 There is also a syntax rule for factor in <b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b>.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">unsigned-constant = unsigned-number | character-string | constant-identifier | 'nil' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">set-constructor = '[' [ member-designator { ',' member-designator } ] ']' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">member-designator = expression [ '..' expression ] .</pre>
</ul>
<p>Any factor whose type is S, where S is a subrange of T, shall be treated 
as if it were of type T. Similarly, any factor whose type is set of S shall be treated as if it 
were of the unpackedcanonical-set-of-T-type, and any factor whose type is packed set of S shall be treated 
as of the packed-canonical-set-of-T-type.</p>
<p>A set-constructor shall denote a value of a set-type. The set-constructor 
[ ] shall denote the value in every set-type that contains no members. A set-constructor containing 
one or more memberdesignators shall denote either a value of the unpacked-canonical-set-of-T-type or, if 
the contextso requires, the packed-canonical-set-of-T-type, where T is the type of every 
expression of eachmember-designator of the set-constructor. The type T shall be an ordinal-type. The value denotedby the set-constructor shall contain zero or more members, each of which 
shall be denoted by atleast one member-designator of the set-constructor.</p>
<p>The member-designator x, where x is an expression, shall denote the member 
that shall be the value of x. The member-designator x..y, where x and y are expressions, shall 
denote zero or more members that shall be the values of the base-type in the closed interval from the 
value of x to the value of y. The order of evaluation of the expressions of a member-designator shall be implementation-dependent. 
The order of evaluation of the member-designators of a set-constructor shall 
be implementation-dependent.</p>
<p>NOTES</p>
<p>2 The member-designator x..y denotes no members if the value of x is greater 
than the value of y.</p>
<p>3 The set-constructor [ ] does not have a single type, but assumes a suitable 
type to satisfy the assignmentcompatibility rules, or the compatibility rules for operators, if possible.</p>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> a) Factors :</pre>
<ul>
    <ul>
        <ul>
            <ul>
                <ul>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> 15</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> (x + y + z)</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> sin(x + y)</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> [red, c, green]</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> [1, 5, 10..19, 23]</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> not p</pre>
                </ul>
            </ul>
        </ul>
    </ul>
</ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> b) Terms :</pre>
<ul>
    <ul>
        <ul>
            <ul>
                <ul>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x * y</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> i / (1 - i)</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> (x &lt;= y) and (y &lt; z)</pre>
                </ul>
            </ul>
        </ul>
    </ul>
</ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> c) Simple Expressions:</pre>
<ul>
    <ul>
        <ul>
            <ul>
                <ul>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> p or q</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x + y</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> -x</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> hue1 + hue2</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> i * j + 1</pre>
                </ul>
            </ul>
        </ul>
    </ul>
</ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> d) Expressions :</pre>
<ul>
    <ul>
        <ul>
            <ul>
                <ul>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x = 1.5</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> p &lt;= q</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> p = q and r</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> (i &lt; j) = (j &lt; k)</pre>
                        <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> c in hue1</pre>
                </ul>
            </ul>
        </ul>
    </ul>
</ul>
<h3><a name="6.7.2 Operators">6.7.2 Operators</a></h3>
<h4><a name="6.7.2.1 General">6.7.2.1 General</a></h4>
<ul>
<p>multiplying-operator = '*' | '/' | 'div' | 'mod' | 'and'</p>
<p>adding-operator = '+' | '-' | 'or'.</p>
<p>relational-operator = '=' | '&lt;&gt; | '&lt;' | '&gt;' | '&lt;=' |&nbsp;'&gt;=' 
    | 'in'.</p>
</ul>
<p>A factor, a term, or a simple-expression shall be designated an operand. 
The order of evaluation of</p>
<h3 style="line-height:100%; margin-top:0; margin-bottom:0;" align="center">Table 3 | Dyadic arithmetic operations</h3>
<table style="line-height:100%; margin-top:0; margin-bottom:0;" border="1">
    <tr>
        <td width="215">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Operator</h3>
        </td>
        <td width="215">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Operation</h3>
        </td>
        <td width="215">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of operands</h3>
        </td>
        <td width="215">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of result</h3>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">+</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Addition</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type 
            or real type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Integer-type 
            if both operands are of integer-type, otherwise real-type</p>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">-</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Subtraction</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type 
            or real type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">*</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">multiplication</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type 
            or real type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">/</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Division</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type 
            or real type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">real-type</p>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">div</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Division 
            with truncation</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type</p>
        </td>
    </tr>
    <tr>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">mod</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Modulo</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type</p>
        </td>
        <td width="215">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type</p>
        </td>
    </tr>
</table>
<p>&nbsp;</p>
<h3 style="line-height:100%; margin-top:0; margin-bottom:0;" align="center">Table 4 | Monadic arithmetic operations</h3>
<table style="line-height:100%; margin-top:0; margin-bottom:0;" border="1">
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Operator</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Operation</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of operand</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of result</p>
        </td>
    </tr>
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">+</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Identity</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Integer-type</p>
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Real-type</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Integer-type</p>
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Real-type</p>
        </td>
    </tr>
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">-</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Sign-inversion</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Integer-type</p>
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Real-type</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Integer-type</p>
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Real-type</p>
        </td>
    </tr>
</table>
<p>the operands of a dyadic operator shall be implementation-dependent.</p>
<p>NOTE -- This means, for example, that the operands may be evaluated in textual 
order, or in reverse order, or in parallel, or they may not both be evaluated.</p>
<h4><a name="6.7.2.2 Arithmetic operators">6.7.2.2 Arithmetic operators</a></h4>
<p>The types of operands and results for dyadic and monadic operations shall 
be as shown in tables 3 and 4 respectively.</p>
<p>NOTE -- 1 The symbols +, -, and * are also used as set operators (see <b><a href="#6.7.2.4 Set operators">6.7.2.4</a></b>).</p>
<p>A term of the form x/y shall be an error if y is zero ; otherwise, the value 
of x/y shall be the result of dividing x by y.</p>
<p>A term of the form i div j shall be an error if j is zero ; otherwise, the 
value of i div j shall be such that</p>
<ul>
<p>abs(i) - abs(j) &lt; abs((i div j) * j) &lt; = abs(i)</p>
</ul>
<p>where the value shall be zero if abs(i) &lt; abs(j) ; otherwise, the sign 
of the value shall be positive if i and j have the same sign and negative if i and j have different signs.</p>
<p>A term of the form i mod j shall be an error if j is zero or negative ; otherwise, 
the value of i mod j shall be that value of (i-(k*j)) for integral k such that 0 &lt; = i mod 
j &lt; j.</p>
<h3 style="line-height:100%; margin-top:0; margin-bottom:0;" align="center">Table 5 | Set operations</h3>
<table style="line-height:100%; margin-top:0; margin-bottom:0;" border="1">
    <tr>
        <td width="216">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Operator</h3>
        </td>
        <td width="216">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Operation</h3>
        </td>
        <td width="216">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of operands</h3>
        </td>
        <td width="216">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of result</h3>
        </td>
    </tr>
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">+</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Set 
            union</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">The 
            same unpacked-canonical-set-of-T-type or packed-canonical-set-of-T-type 
            (see <b>6.7.1</b>)</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Same 
            as operands</p>
        </td>
    </tr>
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">-</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Set 
            difference</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
    </tr>
    <tr>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">*</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Set 
            intersection</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
        <td width="216">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&quot;&quot;</p>
        </td>
    </tr>
</table>
<p>NOTE -- 2 Only for i &gt;= 0 and j &gt; 0 does the relation (i div j) * j 
+ i mod j = i hold.</p>
<p>The required constant-identifier maxint shall denote an implementation-defined 
value of integertype. This value shall satisfy the following conditions.</p>
<ul>
<p>a) All integral values in the closed interval from -maxint to +maxint shall 
be values of the integer-type.</p>
<p>b) Any monadic operation performed on an integer value in this interval shall 
be correctly performed according to the mathematical rules for integer arithmetic.</p>
<p>c) Any dyadic integer operation on two integer values in this same interval 
shall be correctly performed according to the mathematical rules for integer arithmetic, provided 
that the result is also in this interval.</p>
<p>d) Any relational operation on two integer values in this same interval shall 
be correctly performed according to the mathematical rules for integer arithmetic.</p>
</ul>
<p>The results of integer-to-real conversion, of the real arithmetic operators 
and of the required real functions shall be approximations to the corresponding mathematical results. The accuracy of this approximation shall be implementation-defined.</p>
<p>&nbsp;It shall be an error if an integer operation or function is not performed 
according to the mathematical rules for integer arithmetic.</p>
<h4><a name="6.7.2.3 Boolean operators">6.7.2.3 Boolean operators</a></h4>
<p>Operands and results for Boolean operations shall be of Boolean-type. The 
Boolean operators or, and, and not shall denote respectively the logical operations of disjunction, 
conjunction, and negation.</p>
<ul>
<p>Boolean-expression = expression.</p>
</ul>
<p>A Boolean-expression shall be an expression that denotes a value of Boolean-type.</p>
<h4><a name="6.7.2.4 Set operators">6.7.2.4 Set operators</a></h4>
<p>The types of operands and results for set operations shall be as shown in 
table 5.</p>
<p>Where x denotes a value of the ordinal-type T and u and v are operands of 
a canonical-set-of-T-type, it shall be true for all x that</p>
<h3 style="line-height:100%; margin-top:0; margin-bottom:0;" align="center">Table 6 | Relational operations</h3>
<table style="line-height:100%; margin-top:0; margin-bottom:0;" border="1">
    <tr>
        <td width="290">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Operator</h3>
        </td>
        <td width="290">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of operands</h3>
        </td>
        <td width="290">
            <h3 style="line-height:100%; margin-top:0; margin-bottom:0;">Type 
            of result</h3>
        </td>
    </tr>
    <tr>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">= &lt;&gt;</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Any 
            simple-type, pointer-type, string-type, unpacked-canonical-set-of-T-type 
            or packed-canonical-set-of-T-type</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Boolean-type</p>
        </td>
    </tr>
    <tr>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&lt; 
            &gt;</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Any 
            simple-type or&nbsp;string-type</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Boolean-type</p>
        </td>
    </tr>
    <tr>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">&lt;= 
            &gt;=</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Any 
            simple-type, string-type, unpacked-canonical-set-of-T-type or packed-canonical-set-of-T-type</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Boolean-type</p>
        </td>
    </tr>
    <tr>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">in</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Left 
            operand: any ordinal-type T</p>
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Right 
            operand: the unpacked-canonical-set-of-T-type or packed canonical-set-of-T-type</p>
        </td>
        <td width="290">
            <p style="line-height:100%; margin-top:0; margin-bottom:0;">Boolean-type</p>
        </td>
    </tr>
</table>
<ul>
<p>-- x is a member of the value u+v if and only if it is a member of the value 
of u or a member of the value of v;</p>
<p>-- x is a member of the value u-v if and only if it is a member of the value 
of u and not a member of the value of v;</p>
<p>-- x is a member of the value u*v if and only if it is a member of the value 
of u and a member of the value of v.</p>
</ul>
<h4><a name="6.7.2.5 Relational operators">6.7.2.5 Relational operators</a></h4>
<p>The types of operands and results for relational operations shall be as shown 
in table 6.</p>
<p>The operands of =, &lt;&gt;, &lt;, &gt;, &gt;=, and &lt;= shall be of compatible 
types, or they shall be of the same unpacked-canonical-set-of-T-type or packed-canonical-set-of-T-type, 
or one operand shall be of real-type and the other shall be of integer-type.</p>
<p>The operators =, &lt;&gt;, &lt;, and &gt; shall stand for equal to, not equal 
to, less than, and greater than respectively.</p>
<p>Except when applied to sets, the operators &lt;= and &gt; = shall stand for 
less than or equal to and greater than or equal to respectively. Where u and v denote operands of a 
set-type, u &lt; = v shall denote the inclusion of u in v and u &gt; = v shall denote the inclusion 
of v in u.</p>
<p>NOTE -- Since the Boolean-type is an ordinal-type with false less than true, 
then if p and q are operands of Boolean-type, p = q denotes their equivalence and p &lt;= q means p implies 
q.</p>
<p>When the relational-operators = , &lt;&gt; , &lt; , &gt; , &lt; =, and &gt; 
= are used to compare operands of compatible string-types (see <b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>), they shall denote the lexicographic 
relations defined below. This lexicographic ordering shall impose a total ordering on values of a 
string-type.</p>
<p>If s1 and s2 are two values of compatible string-types and n denotes the 
number of components of the compatible string-types, then</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">s1 = s2 iff for all i in [1..n] : s1[i] = s2[i]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">s1 &lt; s2 iff there exists a p in [1..n]:</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">        (for all i in [1..p-1]:</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">         s1[i] = s2[i]) and s1[p] &lt; s2[p]</pre>
</ul>
<p>The definitions of operations &gt;, &lt;&gt;, &lt; =, and &gt; = are derived 
from the definitions of = and &lt;.</p>
<p>The operator in shall yield the value true if the value of the operand of 
ordinal-type is a member of the value of the set-type ; otherwise, it shall yield the value false.</p>
<h3><a name="6.7.3 Function-designators">6.7.3 Function-designators</a></h3>
<p>A function-designator shall specify the activation of the block of the function-block 
associated with the function-identifier of the function-designator and shall yield the 
value of the result of the activation upon completion of the algorithm of the activation ; it shall 
be an error if the result is undefined upon completion of the algorithm.</p>
<p>NOTE -- When a function activation is terminated by a goto-statement (see 
<b><a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b>), the algorithm of the activation does not complete (see <b><a href="#6.2.3.2">6.2.3.2</a></b> <b>a</b>)), and thus there is no error 
if the result of the activation is undefined.</p>
<p>If the function has any formal-parameters, there shall be an actual parameter-list 
in the functiondesignator. The actual-parameter-list shall be the list of actual-parameters that shall 
be bound to their corresponding formal-parameters defined in the function-declaration. The correspondence shall be established by the positions of the parameters in the lists of actual-parameters 
and formalparameters respectively. The number of actual-parameters shall be equal to the number 
of formalparameters. The types of the actual-parameters shall correspond to the types of the formalparameters 
as specified by <b><a href="#6.6.3 Parameters">6.6.3</a></b>. The order of evaluation, accessing, and binding 
of the actualparameters shall be implementation-dependent.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-designator = function-identifier [ actual-parameter-list ].</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">actual-parameter-list = '(' actual-parameter { ',' actual-parameter } ')'.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">actual-parameter = expression | variable-access | procedure-identifier</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                 | function-identifier.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">Sum(a, 63)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">GCD(147, k)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">sin(x + y)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">eof(f)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">ord(f^)</pre>
</ul>
<h2><a name="6.8 Statements">6.8 Statements</a></h2>
<h3><a name="6.8.1 General">6.8.1 General</a></h3>
<p>Statements shall denote algorithmic actions and shall be executable.</p>
<p>NOTE -- 1 A statement may be pre fixed by a label.</p>
<p>A label, if any, of a statement S shall be designated as pre fixing S. The 
label shall be permitted to occur in a goto-statement G (see <b><a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b>) if and only if any of the 
following three conditions is satisfied.</p>
<ul>
<p>a) S contains G.</p>
<p>b) S is a statement of a statement-sequence containing G.</p>
<p>c) S is a statement of the statement-sequence of the compound-statement of 
the statement-part of a block containing G.</p>
    <ul>
<p>statement = [ label ':' ] ( simple-statement j structured-statement ).</p>
    </ul>
</ul>
<p>NOTE -- 2 A goto-statement within a block may refer to a label in an enclosing 
block, provided that the label prefixes a statement at the outermost level of nesting of the block.</p>
<h3><a name="6.8.2 Simple-statements">6.8.2 Simple-statements</a></h3>
<h4><a name="6.8.2.1 General">6.8.2.1 General</a></h4>
<p>A simple-statement shall be a statement not containing a statement. An empty-statement 
shall contain no symbol and shall denote no action.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">simple-statement = empty-statement | assignment-statement</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                 | procedure-statement | goto-statement .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">empty-statement = .</pre>
</ul>
<h4><a name="6.8.2.2 Assignment-statements">6.8.2.2 Assignment-statements</a></h4>
<p>An assignment-statement shall attribute the value of the expression of the 
assignment-statement either to the variable denoted by the variable-access of the assignment-statement 
or to the activation result that is denoted by the function-identifier of the assignment-statement 
; the value shall be assignment-compatible with the type possessed, respectively, by the variable 
or by the activation result. The function-block associated (see <b><a href="#6.6.2 Function-declarations">6.6.2</a></b>) with the function-identifier 
of an assignment-statement shall contain the assignment-statement.</p>
<ul>
<p>assignment-statement = ( variable-access j function-identifier ) ' :=' expression.</p>
</ul>
<p>The variable-access shall establish a reference to the variable during the 
execution of the assignmentstatement. The order of establishing the reference to the variable and evaluating 
the expression shall be implementation-dependent.</p>
<p>The state of a variable or activation result when the variable or activation 
result does not have attributed to it a value specified by its type shall be designated undefined. 
If a variable possesses a structured-type, the state of the variable when every component of the variable 
is totally-undefined shall be designated <i>totally-undefined</i>. Totally-undefined shall be synonymous 
with undefined for an activation result or a variable that does not possess a structured-type.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">x := y + z</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p := (1 &lt;= i) and (i &lt; 100)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">i := sqr(k) - (i * j)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">hue1 := [blue, succ(c)]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p1&quot;.mother := true</pre>
</ul>
<h4><a name="6.8.2.3 Procedure-statements">6.8.2.3 Procedure-statements</a></h4>
<p>A procedure-statement shall specify the activation of the block of the procedure-block 
associated with the procedure-identifier of the procedure-statement. If the procedure has 
any formal-parameters, the procedure-statement shall contain an actual-parameter-list, which is 
the list of actual-parameters that shall be bound to their corresponding formal-parameters defined in the 
procedure-declaration. The correspondence shall be established by the positions of the parameters 
in the lists of actualparameters and formal-parameters respectively. The number of actual-parameters shall 
be equal to the number of formal-parameters. The types of the actual-parameters shall 
correspond to the typesof the formal-parameters as specified by <b><a href="#6.6.3 Parameters">6.6.3</a></b>.</p>
<p>The order of evaluation, accessing, and binding of the actual-parameters 
shall be implementationdependent.</p>
<p>The procedure-identifier in a procedure-statement containing a read-parameter-list 
shall denote the required procedure read ; the procedure-identifier in a procedure-statement 
containing a readln parameter-list shall denote the required procedure readln ; the procedure-identifier 
in a procedurestatement containing a write-parameter-list shall denote the required procedure write 
; the procedureidentifier in a procedure-statement containing a writeln-parameter-list shall denote 
the required procedure writeln.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-statement = procedure-identifier ( [ actual-parameter-list ]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                    | read-parameter-list | readln-parameter-list</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                    | write-parameter-list | writeln-parameter-list ) .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">printheading</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">transpose(a, n, m)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">bisect(fct, -1.0, +1.0, x)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">AddVectors(m[1], m[2], m[k])</pre>
</ul>
<p>NOTE -- The fourth example is not for level 0.</p>
<h4><a name="6.8.2.4 Goto-statements">6.8.2.4 Goto-statements</a></h4>
<p>A goto-statement shall indicate that further processing is to continue at 
the program-point denoted by the label in the goto-statement and shall cause the termination of all 
activations except</p>
<ul>
<p>a) the activation containing the program-point ; and</p>
<p>b) any activation containing the activation-point of an activation required 
by exceptions a) or b) not to be terminated.</p>
    <ul>
<p>goto-statement = 'goto' label .</p>
    </ul>
</ul>
<h3><a name="6.8.3 Structured-statements">6.8.3 Structured-statements</a></h3>
<h4><a name="6.8.3.1 General">6.8.3.1 General</a></h4>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">structured-statement = compound-statement | conditional-statement</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                     | repetitive-statement | with-statement .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">statement-sequence = statement { ';' statement } .</pre>
</ul>
<p>The execution of a statement-sequence shall specify the execution of the 
statements of the statementsequence in textual order, except as modified by execution of a goto-statement.</p>
<h4><a name="6.8.3.2 Compound-statements">6.8.3.2 Compound-statements</a></h4>
<p>A compound-statement shall specify execution of the statement-sequence of 
the compound-statement.</p>
<ul>
<p>compound-statement = 'begin' statement-sequence 'end' .</p>
</ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin z := x ; x := y ; y := z end</pre>
</ul>
<h4><a name="6.8.3.3 Conditional-statements">6.8.3.3 Conditional-statements</a></h4>
<ul>
<p>conditional-statement = if-statement | case-statement .</p>
</ul>
<h4><a name="6.8.3.4 If-statements">6.8.3.4 If-statements</a></h4>
<ul>
<p>if-statement = 'if' Boolean-expression 'then' statement [ else-part ] .</p>
<p>else-part = 'else' statement .</p>
</ul>
<p>If the Boolean-expression of the if-statement yields the value true, the 
statement of the if-statement shall be executed. If the Boolean-expression yields the value false, the 
statement of the if-statement shall not be executed, and the statement of the else-part, if any, shall 
be executed.</p>
<p>An if-statement without an else-part shall not be immediately followed by 
the token else.</p>
<p>NOTE -- An else-part is thus paired with the nearest preceding otherwise unpaired 
then.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if x &lt; 1.5 then z := x + y else z := 1.5</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if p1 &lt;&gt; nil then p1 := p1^.father</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  if j = 0 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    if i = 0 then writeln( ' indefinite ' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    else writeln( ' infinite ' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  else writeln( i / j )</pre>
</ul>
<h4><a name="6.8.3.5 Case-statements">6.8.3.5 Case-statements</a></h4>
<p>The values denoted by the case-constants of the case-constant-lists of the 
case-list-elements of a case-statement shall be distinct and of the same ordinal-type as the expression 
of the case-index of the case-statement. On execution of the case-statement the case-index 
shall be evaluated. That value shall then specify execution of the statement of the case-list-element 
closest-containing the case-constant denoting that value. One of the case-constants shall be equal 
to the value of the case-index upon entry to the case-statement ; otherwise, it shall be an error.</p>
<p>NOTE -- Case-constants are not the same as statement labels.</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">case-statement = 'case' case-index 'of' case-list-element</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">{ ';' case-list-element } [ ';' ] 'end' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">case-list-element = case-constant-list ':' statement .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">case-index = expression .</pre>
</ul>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">case operator of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  plus:  x := x</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  minus: x := x</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  times: x := x</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<h4><a name="6.8.3.6 Repetitive-statements">6.8.3.6 Repetitive-statements</a></h4>
<p>Repetitive-statements shall specify that certain statements are to be executed 
repeatedly.</p>
<ul>
<p>repetitive-statement = repeat-statement j while-statement j for-statement 
    .</p>
</ul>
<h4><a name="6.8.3.7 Repeat-statements">6.8.3.7 Repeat-statements</a></h4>
<ul>
<p>repeat-statement = 'repeat' statement-sequence 'until' Boolean-expression 
    .</p>
</ul>
<p>The statement-sequence of the repeat-statement shall be repeatedly executed, 
except as modified by the execution of a goto-statement, until the Boolean-expression of the repeat-statement 
yields the value true on completion of the statement-sequence. The statement-sequence 
shall be executed at least once, because the Boolean-expression is evaluated after execution of 
the statement-sequence.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Example:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">repeat</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> k := i mod j ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> i := j;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> j := k</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">until j = 0</pre>
</ul>
<h4><a name="6.8.3.8 While-statements">6.8.3.8 While-statements</a></h4>
<ul>
<p>while-statement = 'while' Boolean-expression 'do' statement.</p>
</ul>
<p>The while-statement</p>
<ul>
<p>while b do body</p>
</ul>
<p>shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if b then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> repeat</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   body</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> until not (b)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">while i &gt; 0 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin if odd(i) then z := z * x;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> i := i div 2;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x := sqr(x)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">while not eof(f) do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin process(f^) ; get(f)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
</ul>
<h4><a name="6.8.3.9 For-statements">6.8.3.9 For-statements</a></h4>
<p>The for-statement shall specify that the statement of the for-statement is 
to be repeatedly executed while a progression of values is attributed to a variable denoted by the 
control-variable of the forstatement. </p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for-statement = 'for' control-variable ':=' initial-value ( 'to' | 'downto' ) final-value</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                'do' statement .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">control-variable = entire-variable .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">initial-value = expression .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">final-value = expression .</pre>
</ul>
<p>The control-variable shall be an entire-variable whose identifi er is declared 
in the variable-declarationpart of the block closest-containing the for-statement. The control-variable 
shall possess an ordinal-type, and the initial-value and final-value shall be of a type compatible 
with this type. The initial-value and the final-value shall be assignment-compatible with the 
type possessed by the control-variable if the statement of the for-statement is executed. After 
a for-statement is executed, other than being left by a goto-statement, the control-variable shall be 
undefined. Neither a forstatement nor any procedure-and-function-declaration-part of the block that closest-contains 
a forstatement shall contain a statement threatening the variable denoted by the control-variable 
of the for-statement.</p>
<p>A statement S shall be designated as threatening a variable V if one or more 
of the following statements is true.</p>
<ul>
<p>a) S is an assignment-statement and V is denoted by the variable-access of 
S.</p>
<p>b) S contains an actual variable parameter that denotes V.</p>
<p>c) S is a procedure-statement that specifies the activation of the required 
procedure read or the required procedure readln, and V is denoted by variable-access of a read-parameter-list 
or readln-parameter-list of S.</p>
<p>d) S is a statement specified using an equivalent program fragment containing 
a statement threatening V.</p>
</ul>
<p>Apart from the restrictions imposed by these requirements, the for-statement</p>
<ul>
    <pre>for v := e1 to e2 do body</pre>
</ul>
<p>shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">temp1 := e1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">temp2 := e2;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if temp1 &lt;= temp2 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> v := temp1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> body;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> while v &lt;&gt; temp2 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   v := succ(v);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   body</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<p>and the for-statement</p>
<ul>
    <pre>for v := e1 downto e2 do body</pre>
</ul>
<p>shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">temp1 := e1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">temp2 := e2;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if temp1 &gt;= temp2 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> v := temp1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> body;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> while v &lt;&gt; temp2 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   v := pred(v);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   body</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end</pre>
</ul>
<p>where temp1 and temp2 denote auxiliary variables that the program does not 
otherwise contain, and that possess the type possessed by the variable v if that type is not 
a subrange-type ; otherwise the host-type of the type possessed by the variable v.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for i := 2 to 63 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  if a[i] &gt; max then max := a[i]</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for i := 1 to 10 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for j := 1 to 10 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> x := 0;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> for k := 1 to 10 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  x := x + m1[i,k] * m2[k,j];</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> m[i,j] := x</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for i := 1 to 10 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for j := 1 to i - 1 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">m[i][j] := 0.0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">for c := blue downto red do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> q(c)</pre>
</ul>
<h4><a name="6.8.3.10 With-statements">6.8.3.10 With-statements</a></h4>
<ul>
<p>with-statement = 'with' record-variable-list 'do' statement.</p>
<p>record-variable-list = record-variable { ',' record-variable }</p>
<p>field-designator-identifier = identifier.</p>
</ul>
<p>A with-statement shall specify the execution of the statement of the with-statement. The occurrence of a record-variable as the only record-variable in the record-variable-list 
of a with-statement shall constitute the defining-point of each of the field-identifiers associated 
with components of the record-type possessed by the record-variable as a field-designator-identifier 
for the region that is the statement of the with-statement ; each applied occurrence of a field-designator-identifier 
shall denote that component of the record-variable that is associated with the field-identifier 
by the record-type. The record-variable shall be accessed before the statement of the with-statement 
is executed, and that access shall establish a reference to the variable during the entire 
execution of the statement of the with-statement.</p>
<p>The statement</p>
<ul>
    <pre>with v1,v2,...,vn do s</pre>
</ul>
<p>shall be equivalent to</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">with v1 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> with v2 do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> ...</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   with vn do s</pre>
</ul>
<p><i>Example:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">with date do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if month = 12 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin month := 1 ; year := year + 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> else month := month+1</pre>
</ul>
<p>has the same effect on the variable date as</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if date.month = 12 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin date.month := 1 ; date.year := date.year+1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">else date.month := date.month+1</pre>
</ul>
<h2><a name="6.9 Input and output">6.9 Input and output</a></h2>
<h3><a name="6.9.1 The procedure read">6.9.1 The procedure read</a></h3>
<p>The syntax of the parameter list of read when applied to a textfile shall 
be</p>
<ul>
<p>read-parameter-list = '(' [ file-variable ',' ] variable-access { ',' variable-access 
} ')' .</p>
</ul>
<p>If the file-variable is omitted, the procedure shall be applied to the required 
textfile input, and the program shall contain a program-parameter-list containing an identifier with 
the spelling input.</p>
<p>The requirements of this subclause shall apply for the procedure read when 
applied to a textfile; therein, f shall denote the textfile. The effects of applying read(f,v) 
to the textfile f shall be defined by pre-assertions and post-assertions within the requirements of <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>. The pre-assertion of read(f,v) shall be the pre-assertion of get(f). Let t denote a sequence of components 
having the char-type ; let r, s, and u each denote a value of the sequence-type defined by the structure 
of the type denoted by text ; if u = S( ), then let t = S( ) ; otherwise, let u.first = end-of-line 
; let w = f0&quot; or w = f0.R.first, where the decision as to which shall be implementation-dependent ; and let 
r ~ s ~ t ~u = w ~ f0.R.rest. The post-assertion of read(f,v) shall be</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">(f.M = f0.M) and (f.L ~ f.R = f0.L ~ f0.R) and (f.R = t ~ u) and</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">(if f.R = S( ) then (f^ is totally-undefined) else (f^ = f.R.first)).</p>
<p>NOTE -- 1 The variable-access is not a variable parameter. Consequently, 
it may be a component of a packed structure, and the value of the buffer-variable need only be assignment-compatible 
with it.</p>
<p>a) For n&gt;=1, read(f,v1 ,...,vn ) shall access the textfile and establish 
a reference to that textfile for the remaining execution of the statement ; each of v1,...,vn shall be a variable-access 
possessing a typethat is the real-type, is a string-type, or is compatible with the char-type 
or with the integer-type. For n&gt;=2, the execution of read(f,v 1 ,...,vn ) shall be equivalent 
to</p>
<ul>
    <pre>begin read(ff,v 1 ) ; read(ff,v 2 ,...,v n) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>b) If v is a variable-access possessing the char-type (or subrange thereof), 
the execution of read(f,v) shall be equivalent to</p>
<ul>
    <pre>begin v := ff^ ; get(ff) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>NOTE -- 2 To satisfy the post-assertions of get and of read(f,v) requires 
r = S( ) and length(s) = 1.</p>
<p>c) If v is a variable-access possessing the integer-type (or subrange thereof), 
read(f,v) shall satisfy the following requirements. No component of s shall equal end-of-line. 
The components of r, if any, shall each, and (s ~ t ~ u).first shall not, equal either the char-type 
value space or end-of-line. Either s shall be empty or s shall, and s ~ S(t.first) shall not, form a signed-integer 
according to the syntax of <b><a href="#6.1.5 Numbers">6.1.5</a></b>. It shall be an error if s is empty. The value of the signed-integer 
thus formed shall be assignment-compatible with the type possessed by v and shall be attributed 
to v.</p>
<p>NOTE -- 3 The sequence r represents any spaces and end-of-lines to be skipped, 
and the sequence s represents the signed-integer to be read.</p>
<p>d) If v is a variable-access possessing the real-type, read(f,v) shall satisfy 
the following requirements. No component of s shall equal end-of-line. The components of r, if any, 
shall each, and (s ~t ~u).first shall not, equal either the char-type value space or end-of-line. Either 
s shall be empty or s shall, and s ~ S(t.first) shall not, form a signed-number according to the syntax 
of <b><a href="#6.1.5 Numbers">6.1.5</a></b>. It shall be an error if s is empty. The value denoted by the number thus formed shall be 
attributed to the variable v.</p>
<p>NOTE -- 4 The sequence r represents any spaces and end-of-lines to be skipped, 
and the sequence s represents the number to be read.</p>
<h3><a name="6.9.2 The procedure readln">6.9.2 The procedure readln</a></h3>
<p>The syntax of the parameter list of <b>readln</b> shall be</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">readln-parameter-list = [ '(' ( file-variable | variable-access )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        { ',' variable-access } ')' ] .</pre>
</ul>
<p>Readln shall only be applied to textfiles. If the file-variable or the entire 
readln-parameter-list is omitted, the procedure shall be applied to the required textfile input, and 
the program shall contain a program-parameter-list containing an identifier with the spelling input.</p>
<p>Readln(f,v 1 ,...,v n ) shall access the textfile and establish a reference 
to that textfile for the remaining execution of the statement. The execution of the statement shall be equivalent 
to</p>
<ul>
    <pre>begin read(ff,v 1 ,...,vn ) ; readln(ff) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>Readln(f) shall access the textfile and establish a reference to that textfile 
for the remaining execution of the statement. The execution of the statement shall be equivalent to</p>
<ul>
    <pre>begin while not eoln(ff) do get(ff) ; get(ff) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>NOTES</p>
<p>1 The effect of readln is to place the current file position just past the 
end of the current line in the textfile. Unless this is the end-of-file position, the current file position is therefore 
at the start of the next line.</p>
<p>2 Because the definition of readln makes use of get, the implementation-defined 
aspects of the post-assertion of get also apply (see <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>).</p>
<h3><a name="6.9.3 The procedure write">6.9.3 The procedure write</a></h3>
<p>The syntax of the parameter list of write when applied to a textfile shall 
be</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">write-parameter-list = '(' [ file-variable ',' ] write-parameter</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                       { ',' write-parameter } ')' .</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">write-parameter = expression [ ':' expression [ ':' expression ] ] .</pre>
</ul>
<p>If the file-variable is omitted, the procedure shall be applied to the required 
textfile output, and the program shall contain a program-parameter-list containing an identifier with 
the spelling output. When write is applied to a textfile f, it shall be an error if f is undefined 
or f.M = Inspection (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>).</p>
<p>For n&gt;=1, write(f,p 1 ,...,p n ) shall access the textfile and establish 
a reference to that textfile for the remaining execution of the statement. For n &gt;=2, the execution of the 
statement shall be equivalent to</p>
<ul>
    <pre>begin write(ff,p 1 ) ; write(ff,p2 ,...,p n ) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>Write(f,p), where f denotes a textfile and p is a write-parameter, shall 
write a sequence of zero or more characters on the textfile f ; for each character c in the sequence, 
the equivalent of</p>
<ul>
    <pre>begin ff^ := c; put(ff) end</pre>
</ul>
<p>where ff denotes the referenced textfile, shall be applied to the textfile 
f. The sequence of characters written shall be a representation of the value of the first expression in 
the write-parameter p, as specified in the remainder of this subclause.</p>
<p>NOTE -- Because the de fi nition of write includes the use of put, the implementation-de 
fined aspects of the post-assertion of put also apply (see <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>).</p>
<h4><a name="6.9.3.1 Write-parameters">6.9.3.1 Write-parameters</a></h4>
<p>A write-parameter shall have one of the following forms</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">e : TotalWidth : FracDigits</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">e : TotalWidth</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">e</p>
</ul>
<p>where e shall be an expression whose value is to be written on the file f 
and shall be of integertype, real-type, char-type, Boolean-type, or a string-type, and where TotalWidth 
and FracDigits shall be expressions of integer-type whose values shall be the field-width 
parameters. The values of TotalWidth and FracDigits shall be greater than or equal to one ; it shall 
be an error if either value is less than one.</p>
<p>Write(f,e) shall be equivalent to the form write(f,e : TotalWidth), using 
a default value for TotalWidth that depends on the type of e ; for integer-type, real-type, and Boolean-type, 
the default values shall be implementation-defined.</p>
<p>Write(f,e : TotalWidth : FracDigits) shall be applicable only if e is of 
real-type (see <b><a href="#6.9.3.4.2 The fixed-point representation">6.9.3.4.2</a></b>).</p>
<h4><a name="6.9.3.2 Char-type">6.9.3.2 Char-type</a></h4>
<p>If e is of char-type, the default value of TotalWidth shall be one. The 
representation written on the file f shall be</p>
<ul>
<p>(TotalWidth - 1) spaces, the character value of e.</p>
</ul>
<h4><a name="6.9.3.3 Integer-type">6.9.3.3 Integer-type</a></h4>
<p>If e is of integer-type, the decimal representation of the value of e shall 
be written on the file f. Assume a function</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function IntegerSize ( x : integer ) : integer ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> { returns the number of digits, z, such that</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  10 to the power (z - 1) &lt; abs(x) &lt; 10 to the power z }</pre>
</ul>
<p>and let IntDigits be the positive integer defined by</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if e = 0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">then IntDigits := 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">else IntDigits := IntegerSize(e);</pre>
</ul>
<p>then the representation shall consist of</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">a) if TotalWidth &gt; = IntDigits + 1:</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     (TotalWidth - IntDigits - 1) spaces,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     the sign character: '-' if e &lt; 0, otherwise a space,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     IntDigits digit-characters of the decimal representation of abs(e).</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">b) if TotalWidth &lt; IntDigits + 1:</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     if e &lt; 0 the sign character '- ',</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     IntDigits digit-characters of the decimal representation of abs(e).</pre>
</ul>
<h4><a name="6.9.3.4 Real-type">6.9.3.4 Real-type</a></h4>
<p>If e is of real-type, a decimal representation of the value of e, rounded 
to the specified number of significant figures or decimal places, shall be written on the file f.</p>
<h5><a name="6.9.3.4.1 The floating-point representation">6.9.3.4.1 The floating-point representation</a></h5>
<p>Write(f,e : TotalWidth) shall cause aoating-point representation of the value 
of e to be written. Assume functions</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function TenPower ( Int : integer ) : real ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> { Returns 10.0 raised to the power Int }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function RealSize ( y : real ) : integer ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> { Returns the value, z, such that TenPower(z - 1) &lt; abs(y) &lt;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   TenPower(z) }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">function Truncate ( y : real ; DecPlaces : integer ) : real ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> { Returns the value of y after truncation to DecPlaces decimal places }</pre>
</ul>
<p>let ExpDigits be an implementation-defined value representing the number 
of digit-characters written in an exponent;</p>
<p>let ActWidth be the positive integer defined by</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if TotalWidth &gt; = ExpDigits + 6</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  then ActWidth := TotalWidth</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  else ActWidth := ExpDigits + 6;</pre>
</ul>
<p>and let the non-negative number eWritten, the positive integer DecPlaces, 
and the integer ExpValue be defined by</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">DecPlaces := ActWidth - ExpDigits - 5;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if e = 0.0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   then begin eWritten := 0.0 ; ExpValue := 0 end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   else</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    eWritten := abs(e);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    ExpValue := RealSize ( eWritten ) - 1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    eWritten := eWritten / TenPower ( ExpValue );</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    eWritten := eWritten + 0.5 * TenPower ( -DecPlaces );</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    if eWritten &gt; = 10.0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">       eWritten := eWritten / 10.0;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">       ExpValue := ExpValue + 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    eWritten := Truncate ( eWritten, DecPlaces )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   end ;</pre>
</ul>
<p>then the floating-point representation of the value of e shall consist of</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the sign character</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   ( '-' if (e &lt; 0.0) and (eWritten &gt; 0.0), otherwise a space ),</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the leading digit-character of the decimal representation of eWritten,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the character '.' ,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the next DecPlaces digit-characters of the decimal representation of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   eWritten,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">an implementation-defined exponent character</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   (either 'e' or 'E'),</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the sign of ExpValue</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   ( '-' if ExpValue &lt; 0, otherwise '+' ),</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the ExpDigits digit-characters of the decimal representation of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   ExpValue (with leading zeros if the value requires them).</pre>
</ul>
<h5><a name="6.9.3.4.2 The fixed-point representation">6.9.3.4.2 The fixed-point representation</a></h5>
<p>Write(f,e : TotalWidth : FracDigits) shall cause a fixed-point representation 
of the value of e to be written. Assume the functions TenPower, RealSize, and Truncate described 
in <b><a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a></b>;</p>
<p>let eWritten be the non-negative number defined by</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if e = 0.0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> then eWritten := 0.0</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> else</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  eWritten := abs(e);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  eWritten := eWritten + 0.5 * TenPower ( - FracDigits );</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  eWritten := Truncate ( eWritten, FracDigits )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end;</pre>
</ul>
<p>let IntDigits be the positive integer defined by</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if RealSize ( eWritten ) &lt; 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> then IntDigits := 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> else IntDigits := RealSize ( eWritten );</pre>
</ul>
    <pre>and let MinNumChars be the positive integer defined by</pre>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">MinNumChars := IntDigits + FracDigits + 1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if (e &lt; 0.0) and (eWritten &gt; 0.0)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> then MinNumChars := MinNumChars + 1 ; {'-' required}</pre>
</ul>
<p>then the fixed-point representation of the value of e shall consist of</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if TotalWidth &gt; = MinNumChars,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    (TotalWidth - MinNumChars) spaces,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the character '-' if (e &lt; 0.0) and (eWritten &gt; 0.0),</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the first IntDigits digit-characters of the decimal representation of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    the value of eWritten,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the character '.',</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the next FracDigits digit-characters of the decimal representation of</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    the value of eWritten.</pre>
</ul>
<p>NOTE -- At least MinNumChars characters are written. If TotalWidth is less 
than this value, no initial spaces are written.</p>
<h4><a name="6.9.3.5 Boolean-type">6.9.3.5 Boolean-type</a></h4>
<p>If e is of Boolean-type, a representation of the word true or the word false 
(as appropriate to the value of e) shall be written on the file f. This shall be equivalent to writing 
the appropriate character-string ' True ' or ' False ' (see <b><a href="#6.9.3.6 String-types">6.9.3.6</a></b>), where the case of each letter is 
implementation-defined, with a field-width parameter of TotalWidth.</p>
<h4><a name="6.9.3.6 String-types">6.9.3.6 String-types</a></h4>
<p>If the type of e is a string-type with n components, the default value of 
TotalWidth shall be n. The representation shall consist of</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if TotalWidth &gt; n,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> (TotalWidth - n) spaces,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">the first through n-th characters of the value of e in that order.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">if 1 &lt;= TotalWidth &lt;= n,</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> the first through TotalWidth-th characters in that order.</pre>
</ul>
<h3><a name="6.9.4 The procedure writeln">6.9.4 The procedure writeln</a></h3>
<p>The syntax of the parameter list of writeln shall be</p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln-parameter-list = [ '(' ( file-variable j write-parameter )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         { ',' write-parameter g ')' ] .</pre>
</ul>
<p>Writeln shall only be applied to textfiles. If the file-variable or the 
writeln-parameter-list is omitted, the procedure shall be applied to the required textfile output, and the program 
shall contain a program-parameter-list containing an identifier with the spelling output.</p>
<p>Writeln(f,p 1 ,...,p n ) shall access the textfile and establish a reference 
to that textfile for the remaining execution of the statement. The execution of the statement shall be equivalent 
to</p>
<ul>
    <pre>begin write(ff,p 1 ,...,pn) ; writeln(ff) end</pre>
</ul>
<p>where ff denotes the referenced textfile.</p>
<p>Writeln shall be defined by a pre-assertion and a post-assertion using the 
notation of <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>.</p>
<p>pre-assertion : (f0 is not undefined) and (f0.M = Generation) and (f0.R 
= S( )).</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">post-assertion : (f.L = (f0.L ~ S(end-of-line))) and (f^ is totally-undefined)</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">and (f.R = S( )) and (f.M = Generation),</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">where S(e) is the sequence consisting solely of the end-of-line component 
defined in <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>.</p>
</ul>
<p>NOTE -- Writeln(f) terminates the partial line, if any, that is being generated. By the conventions of <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b> it is an error if the pre-assertion is not true prior to writeln(f).</p>
<h3><a name="6.9.5 The procedure page">6.9.5 The procedure page</a></h3>
<p>It shall be an error if the pre-assertion required for writeln(f) (see <b><a href="#6.9.4 The procedure writeln">6.9.4</a></b>) does not hold prior to the activation of page(f). If the actual-parameter-list is omitted, the 
procedure shall be applied to the required textfile output, and the program shall contain a program-parameter-list 
containing an identifier with the spelling output. Page(f) shall cause an implementation-defined 
effect on the textfile f, such that subsequent text written to f will be on a new page 
if the textfile is printed on a suitable device, shall perform an implicit writeln(f) if f.L is not empty 
and if f.L.last is not the endof-line component (see <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>), and shall cause the buffer-variable f^ 
to become totally-undefined. The effect of inspecting a textfile to which the page procedure was applied 
during generation shall be implementation-dependent.</p>
<h2><a name="6.10 Programs">6.10 Programs</a></h2>
<ul>
<p>program = program-heading ' ;' program-block '.' .</p>
<p>program-heading = 'program' identifier [ '(' program-parameter-list ')'] 
     
    .</p>
<p>program-parameter-list = identifier-list .</p>
<p>program-block = block .</p>
</ul>
<p>The identifier of the program-heading shall be the program name. It shall 
have no significance within the program. The identifiers contained by the program-parameter-list 
shall be distinct and shall be designated program-parameters. Each program-parameter shall have 
a defining-point as a variable-identifier for the region that is the program-block. The binding 
of the variables denoted by the program-parameters to entities external to the program shall be implementation-dependent, 
except if the variable possesses a file-type in which case the binding shall 
be implementation-defined.</p>
<p>NOTE -- The external representation of such external entities is not defined 
by this International Standard.</p>
<p>The execution of any action, operation, or function, defined within clause 
6 to operate on a variable, shall be an error if the variable is a program-parameter and, as a result 
of the binding of the program-parameter, the execution cannot be completed as defined.</p>
<p>The occurrence of the required identifier input or output as a program-parameter 
shall constitute its defining-point for the region that is the program-block as a variable-identifier 
of the required type denoted by the required type-identifier text. Such occurrence of the identifier 
input shall cause the post-assertions of reset to hold, and of output, the post-assertions 
of rewrite to hold, prior to the first access to the textfile or its associated buffer-variable. The 
effect of the application of the required procedure reset or the required procedure rewrite to either 
of these textfiles shall be implementation-defined.</p>
<p><i>Examples:</i></p>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">program copy (f, g);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var f, g : file of real;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin reset(f) ; rewrite(g);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">     while not eof(f) do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">       begin g&quot; := f^ ; get(f) ; put(g)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">       end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">program copytext (input, output);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> {This program copies the characters and line structure of the textfile</pre>
</ul>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> input to the textfile output. g</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> var ch : char;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    while not eof do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      while not eoln do</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">        begin read(ch) ; write(ch)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">        end;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">      readln; writeln</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end.</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">program t6p6p3p4 (output);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">var globalone, globaltwo : integer;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure dummy ;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln( ' fail4 ' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end { of dummy 1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure p (procedure f(procedure ff ; procedure gg) ; procedure g);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> var localtop : integer;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> procedure r;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  begin { r }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  if globalone = 1 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   if (globaltwo &lt;&gt;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    writeln( ' fail1' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  else if globalone = 2 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   if (globaltwo &lt;&gt; 2) or (localtop &lt;&gt; 2) then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    writeln( ' fail2 ' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   else</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">    writeln( ' pass ' )</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   end</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  else</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">   writeln( ' fail3 ' );</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  globalone := globalone + 1</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  end { of r ~;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin { of p }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> globaltwo := globaltwo + 1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> localtop := globaltwo;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> if globaltwo = 1 then</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  p(f, r)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> else</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">  f(g, r)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end { of p};</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure q (procedure f ; procedure g);</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> begin</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> f;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> g</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;"> end { of q};</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin { of t6p6p3p4 }</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">globalone := 1;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">globaltwo := 0;</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">p(q, dummy)</pre>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">end. { of t6p6p3p4 }</pre>
</ul>
<h1 align="center"><a name="Annex A">Annex A</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Collected syntax</h2>
<p>The nonterminal symbols pointer-type, program, signed-number, simple-type, 
special-symbol, and structured-type are only referenced by the semantics and are not used in 
the right-hand-side of any production. The nonterminal symbol program is the start symbol of the grammar.</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.7.3 Function-designators">6.7.3</a></b>       actual-parameter = expression | variable-access | procedure-identifier</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                             | function-identifier.</pre>
<pre><a href="#6.7.3 Function-designators"><b>6.7.3</b></a>       actual-parameter-list = '(' actual-parameter { ',' actual-parameter } ')' .</pre>
<pre><a href="#6.7.2.1 General"><b>6.7.2.1</b></a>     adding-operator = '+' | '-' | 'or' .</pre>
<pre><b><a href="#6.1.7 Character-strings">6.1.7</a></b>       apostrophe-image = '&quot;' .</pre>
<pre><b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>     array-type = 'array' '[' index-type { ',' index-type } ']' 'of' component-type .</pre>
<pre><b><a href="#6.5.3.2 Indexed-variables">6.5.3.2</a></b>     array-variable = variable-access .</pre>
<pre><b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b>     assignment-statement = ( variable-access | function-identifier ) ':=' expression .</pre>
<pre><b><a href="#6.4.3.4 Set-types">6.4.3.4</a></b>     base-type = ordinal-type .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.2.1 Blocks">6.2.1</a></b>       block = label-declaration-part constant-definition-part type-definition-part</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                    variable-declaration-part procedure-and-function-declaration-part</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                    statement-part .</pre>
<pre><b><a href="#6.7.2.3 Boolean operators">6.7.2.3</a></b>     Boolean-expression = expression .</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   bound-identifier = identifier .</font></pre>
<pre><b><a href="#6.5.5 Buffer-variables">6.5.5</a></b>       buffer-variable = file-variable '&quot;' .</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     case-constant = constant .</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     case-constant-list = case-constant { ',' case-constant } .</pre>
<pre><b><a href="#6.8.3.5 Case-statements">6.8.3.5</a></b>     case-index = expression .</pre>
<pre><b><a href="#6.8.3.5 Case-statements">6.8.3.5</a></b>     case-list-element = case-constant-list ':' statement .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.8.3.5 Case-statements">6.8.3.5</a></b>     case-statement = 'case' case-index 'of' case-list-element</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                             { ';' case-list-element } [ ';' ] 'end' .</pre>
<pre><b><a href="#6.1.7 Character-strings">6.1.7</a></b>       character-string = ''' string-element { string-element } '''</pre>
<pre><b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>     component-type = type-denoter .</pre>
<pre><b><a href="#6.5.3.1 General">6.5.3.1</a></b>     component-variable = indexed-variable | field-designator.</pre>
<pre><b><a href="#6.8.3.2 Compound-statements">6.8.3.2</a></b>     compound-statement = 'begin' statement-sequence 'end'.</pre>
<pre><b><a href="#6.8.3.3 Conditional-statements">6.8.3.3</a></b>     conditional-statement = if-statement | case-statement.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   conformant-array-parameter-specification = value-conformant-array-specification</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                                                     | variable-conformant-array-specification.</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">&nbsp;</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   conformant-array-schema = packed-conformant-array-schema</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                                    | unpacked-conformant-array-schema.</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.3 Constant-definitions">6.3</a></b>         constant = [ sign ] ( unsigned-number | constant-identifier )</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                     | character-string.</pre>
<pre><b><a href="#6.3 Constant-definitions">6.3</a></b>         constant-definition = identifier '=' constant.</pre>
<pre><b><a href="#6.2.1 Blocks">6.2.1</a></b>       constant-definition-part = [ 'const' constant-definition ';' { constant-definition ';' } ] .</pre>
<pre><b><a href="#6.3 Constant-definitions">6.3</a></b>         constant-identifier = identifier .</pre>
<pre><b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b>     control-variable = entire-variable .</pre>
<pre><b><a href="#6.1.1 General">6.1.1</a></b>       digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' .</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       digit-sequence = digit { digit } .</pre>
<pre><b><a href="#6.1.4 Directives">6.1.4</a></b>       directive = letter { letter | digit }.</pre>
<pre><b><a href="#6.4.4 Pointer-types">6.4.4</a></b>       domain-type = type-identifier.</pre>
<pre><b><a href="#6.8.3.4 If-statements">6.8.3.4</a></b>     else-part = 'else' statement.</pre>
<pre><b><a href="#6.8.2.1 General">6.8.2.1</a></b>     empty-statement =.</pre>
<pre><b><a href="#6.5.2 Entire-variables">6.5.2</a></b>       entire-variable = variable-identifier.</pre>
<pre><b><a href="#6.4.2.3 Enumerated-types">6.4.2.3</a></b>     enumerated-type = '(' identifier-list ')'.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       expression = simple-expression [ relational-operator simple-expression ].</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   factor &gt; bound-identifier.</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.7.1 General">6.7.1</a></b>       factor &gt; variable-access | unsigned-constant | function-designator</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                   | set-constructor | '(' expression ')' | 'not' factor.</pre>
<pre><b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>     field-designator = record-variable '.' field-specifier | field-designator-identifier.</pre>
<pre><b><a href="#6.8.3.10 With-statements">6.8.3.10</a></b>    field-designator-identifier = identifier.</pre>
<pre><b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>     field-identifier = identifier.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     field-list = [ ( fixed-part [ ';' variant-part ] | variant-part ) [ ';' ] ].</pre>
<pre><b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>     field-specifier = field-identifier.</pre>
<pre><b><a href="#6.4.3.5 File-types">6.4.3.5</a></b>     file-type = 'file' 'of' component-type.</pre>
<pre><b><a href="#6.5.5 Buffer-variables">6.5.5</a></b>       file-variable = variable-access.</pre>
<pre><b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b>     final-value = expression.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     fixed-part = record-section { ';' record-section } .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b>     for-statement = 'for' control-variable ':=' initial-value ( 'to' | 'downto' ) final-value</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                            'do' statement.</pre>
<pre><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     formal-parameter-list = '(' formal-parameter-section { ';' formal-parameter-section } ')' .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     formal-parameter-section &gt; value-parameter-specification</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                     | variable-parameter-specification</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                     | procedural-parameter-specification</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                     | functional-parameter-specification.</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   formal-parameter-section &gt; conformant-array-parameter-specification.</font></pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       fractional-part = digit-sequence.</pre>
<pre><b><a href="#6.6.2 Function-declarations">6.6.2</a></b><a href="#6.6.2 Function-declarations"> </a>      function-block = block.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.2 Function-declarations">6.6.2</a></b>       function-declaration = function-heading ';'directive</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                 | function-identification ';' function-block</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                 | function-heading ';' function-block.</pre>
<pre><b><a href="#6.7.3 Function-designators">6.7.3</a></b>       function-designator = function-identifier [ actual-parameter-list ].</pre>
<pre><b><a href="#6.6.2 Function-declarations">6.6.2</a></b>       function-heading = 'function' identifier [ formal-parameter-list ] ':' result-type.</pre>
<pre><b><a href="#6.6.2 Function-declarations">6.6.2</a></b>       function-identification = 'function' function-identifier.</pre>
<pre><b><a href="#6.6.2 Function-declarations">6.6.2</a></b>       function-identifier = identifier.</pre>
<pre><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     functional-parameter-specification = function-heading.</pre>
<pre><b><a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b>     goto-statement = 'goto' label.</pre>
<pre><b><a href="#6.5.4 Identified-variables">6.5.4</a></b>       identified-variable = pointer-variable '&quot;'.</pre>
<pre><b><a href="#6.1.3 Identifiers">6.1.3</a></b>       identifier = letter { letter | digit }.</pre>
<pre><b><a href="#6.4.2.3 Enumerated-types">6.4.2.3</a></b>     identifier-list = identifier { ',' identifier }.</pre>
<pre><b><a href="#6.8.3.4 If-statements">6.8.3.4</a></b>     if-statement = 'if' Boolean-expression 'then' statement [ else-part ].</pre>
<pre><b><a href="#6.5.3.2 Indexed-variables">6.5.3.2</a></b>     index-expression = expression.</pre>
<pre><b><a href="#6.4.3.2 Array-types">6.4.3.2</a></b>     index-type = ordinal-type.</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   index-type-specification = identifier '..' identifier ':' ordinal-type-identifier.</font></pre>
<pre><b><a href="#6.5.3.2 Indexed-variables">6.5.3.2</a></b>     indexed-variable = array-variable '[' index-expression, { ',' index-expression } ']' .</pre>
<pre><b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b>     initial-value = expression.</pre>
<pre><b><a href="#6.1.6 Labels">6.1.6</a></b>       label = digit-sequence.</pre>
<pre><b><a href="#6.2.1 Blocks">6.2.1</a></b>       label-declaration-part = [ 'label' label { ',' label } ';' ] .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.1.1 General">6.1.1</a></b>       letter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                   | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                   | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       member-designator = expression [ '..' expression ].</pre>
<pre><b><a href="#6.7.2.1 General">6.7.2.1</a></b>     multiplying-operator = '*' | '/' | 'div' | 'mod' | 'and'.</pre>
<pre><b><a href="#6.4.2.1 General">6.4.2.1</a></b>     new-ordinal-type = enumerated-type | subrange-type.</pre>
<pre><b><a href="#6.4.4 Pointer-types">6.4.4</a></b><a href="#6.4.4 Pointer-types"> </a>      new-pointer-type = '^' domain-type.</pre>
<pre><b><a href="#6.4.3.1 General">6.4.3.1</a></b>     new-structured-type = [ 'packed' ] unpacked-structured-type.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       new-type = new-ordinal-type | new-structured-type | new-pointer-type.</pre>
<pre><b><a href="#6.4.2.1 General">6.4.2.1</a></b>     ordinal-type = new-ordinal-type | ordinal-type-identifier.</pre>
<pre><b><a href="#6.4.2.1 General">6.4.2.1</a></b>     ordinal-type-identifier = type-identifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   packed-conformant-array-schema = 'packed' 'array' '[' index-type-specification ']'</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                                             'of' type-identifier.</font></pre>
<pre><b><a href="#6.4.4 Pointer-types">6.4.4</a></b>       pointer-type = new-pointer-type | pointer-type-identifier.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       pointer-type-identifier = type-identifier.</pre>
<pre><b><a href="#6.5.4 Identified-variables">6.5.4</a></b>       pointer-variable = variable-access.</pre>
<pre><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     procedural-parameter-specification = procedure-heading.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.2.1 Blocks">6.2.1</a></b>       procedure-and-function-declaration-part = { ( procedure-declaration</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                                        | function-declaration ) ';' } .</pre>
<pre><b><a href="#6.6.1 Procedure-declarations">6.6.1</a> </b>      procedure-block = block.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b>       procedure-declaration = procedure-heading ';' directive</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                  | procedure-identification ';' procedure-block</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                  | procedure-heading ';' procedure-block .</pre>
<pre><b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b>       procedure-heading = 'procedure' identifier [ formal-parameter-list ].</pre>
<pre><b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b>       procedure-identification = 'procedure' procedure-identifier.</pre>
<pre><b><a href="#6.6.1 Procedure-declarations">6.6.1</a></b>       procedure-identifier = identifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b>     procedure-statement = procedure-identifier ( [ actual-parameter-list ]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                  | read-parameter-list | readln-parameter-list</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                  | write-parameter-list | writeln-parameter-list ) .</pre>
<pre><b><a href="#6.10 Programs">6.10</a></b>        program = program-heading ';' program-block '.'.</pre>
<pre><b><a href="#6.10 Programs">6.10</a></b>        program-block = block.</pre>
<pre><b><a href="#6.10 Programs">6.10</a></b>        program-heading = 'program' identifier [ '(' program-parameter-list ')' ] .</pre>
<pre><b><a href="#6.10 Programs">6.10</a></b>        program-parameter-list = identifier-list.</pre>
<pre><b><a href="#6.9.1 The procedure read">6.9.1</a></b>       read-parameter-list = '(' [ file-variable ',' ] variable-access { ',' variable-access } ')' .</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.9.2 The procedure readln">6.9.2</a></b>       readln-parameter-list = [ '(' ( file-variable | variable-access )</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                    { ',' variable-access } ')' ].</pre>
<pre><b><a href="#6.4.2.1 General">6.4.2.1</a></b>     real-type-identifier = type-identifier.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     record-section = identifier-list ':' type-denoter.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     record-type = 'record' field-list 'end'.</pre>
<pre><b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b>     record-variable = variable-access.</pre>
<pre><b><a href="#6.8.3.10 With-statements">6.8.3.10</a></b>    record-variable-list = record-variable { ',' record-variable }.</pre>
<pre><b><a href="#6.7.2.1 General">6.7.2.1</a></b>     relational-operator = '=' | '&lt;&gt;' | '&lt;' | '&gt;' | '&lt;=' | '&gt;=' | 'in'.</pre>
<pre><b><a href="#6.8.3.7 Repeat-statements">6.8.3.7</a></b>     repeat-statement = 'repeat' statement-sequence 'until' Boolean-expression.</pre>
<pre><b><a href="#6.8.3.6 Repetitive-statements">6.8.3.6</a></b>     repetitive-statement = repeat-statement | while-statement | for-statement.</pre>
<pre><b><a href="#6.6.2 Function-declarations">6.6.2</a></b>       result-type = simple-type-identifier | pointer-type-identifier.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       scale-factor = [ sign ] digit-sequence.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       set-constructor = '[' [ member-designator { ',' member-designator } ] ']'.</pre>
<pre><b><a href="#6.4.3.4 Set-types">6.4.3.4</a></b>     set-type = 'set' 'of' base-type.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       sign = '+' | '-'.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       signed-integer = [ sign ] unsigned-integer.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       signed-number = signed-integer | signed-real.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       signed-real = [ sign ] unsigned-real.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       simple-expression = [ sign ] term { adding-operator term }.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.8.2.1 General">6.8.2.1</a></b>     simple-statement = empty-statement | assignment-statement</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                             | procedure-statement | goto-statement.</pre>
<pre><b><a href="#6.4.2.1 General">6.4.2.1</a></b>     simple-type = ordinal-type | real-type-identifier.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       simple-type-identifier = type-identifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.1.2 Special-symbols">6.1.2</a></b>       special-symbol = '+' | '~' | '*' | '/' | '=' | '&lt;' | '&gt;' | '[' | ']'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                           | '.' | ',' | ':' |' ;' | '&quot;' | '(' | ')'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                           | '&lt;&gt;' | '&lt;=' | '&gt;=' | ' :=' | '..' | word-symbol</pre>
<pre><b><a href="#6.8.1 General">6.8.1</a></b>       statement = [ label ' :' ] ( simple-statement | structured-statement ).</pre>
<pre><b><a href="#6.2.1 Blocks">6.2.1</a></b>       statement-part = compound-statement.</pre>
<pre><b><a href="#6.8.3.1 General">6.8.3.1</a></b>     statement-sequence = statement { ';' statement }.</pre>
<pre><b><a href="#6.1.7 Character-strings">6.1.7</a></b>       string-character = one-of-a-set-of-implementation-defined-characters.</pre>
<pre><b><a href="#6.1.7 Character-strings">6.1.7</a></b>       string-element = apostrophe-image | string-character.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.8.3.1 General">6.8.3.1</a></b>     structured-statement = compound-statement | conditional-statement</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                 | repetitive-statement | with-statement.</pre>
<pre><b><a href="#6.4.3.1 General">6.4.3.1</a></b>     structured-type = new-structured-type | structured-type-identifier.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       structured-type-identifier = type-identifier.</pre>
<pre><b><a href="#6.4.2.4 Subrange-types">6.4.2.4</a></b>     subrange-type = constant '..' constant.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     tag-field = identifier.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     tag-type = ordinal-type-identifier.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       term = factor { multiplying-operator factor }.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       type-definition = identifier '=' type-denoter.</pre>
<pre><b><a href="#6.2.1 Blocks">6.2.1</a></b>       type-definition-part = [ 'type' type-definition ' ;' { type-definition ';' } ] .</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       type-denoter = type-identifier | new-type.</pre>
<pre><b><a href="#6.4.1 General">6.4.1</a></b>       type-identifier = identifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   unpacked-conformant-array-schema =</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                 'array' '[' index-type-specification { ';' index-type-specification } ']'</font></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">                 'of' ( type-identifier | conformant-array-schema ).</font></pre>
<pre><b><a href="#6.4.3.1 General">6.4.3.1</a></b>     unpacked-structured-type = array-type | record-type | set-type | file-type.</pre>
<pre><b><a href="#6.7.1 General">6.7.1</a></b>       unsigned-constant = unsigned-number | character-string | constant-identifier | 'nil'.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       unsigned-integer = digit-sequence.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       unsigned-number = unsigned-integer | unsigned-real.</pre>
<pre><b><a href="#6.1.5 Numbers">6.1.5</a></b>       unsigned-real = digit-sequence '.' fractional-part [ 'e' scale-factor ]</pre>
<pre>                          | digit-sequence 'e' scale-factor.</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   value-conformant-array-specification = identifier-list ':' conformant-array-schema.</font></pre>
<pre><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     value-parameter-specification = identifier-list ':' type-identifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.5.1 Variable-declarations">6.5.1</a></b>       variable-access = entire-variable | component-variable | identified-variable</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                            | buffer-variable.</pre>
<pre><b><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b><font color="red">   variable-conformant-array-specification = 'var' identifier-list ':' conformant-array-schema.</font></pre>
<pre><b><a href="#6.5.1 Variable-declarations">6.5.1</a></b>       variable-declaration = identifier-list ':' type-denoter.</pre>
<pre><b><a href="#6.2.1 Blocks">6.2.1</a></b>       variable-declaration-part = [ 'var' variable-declaration ' ;' { variable-declaration ';' } ] .</pre>
<pre><b><a href="#6.5.2 Entire-variables">6.5.2</a></b>       variable-identifier = identifier.</pre>
<pre><b><a href="#6.6.3.1 General">6.6.3.1</a></b>     variable-parameter-specification = 'var' identifier-list ':' type-identifier.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     variant = case-constant-list ':' '(' field-list ')'.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     variant-part = 'case' variant-selector 'of' variant { ';' variant }.</pre>
<pre><b><a href="#6.4.3.3 Record-types">6.4.3.3</a></b>     variant-selector = [ tag-field ':' ] tag-type.</pre>
<pre><b><a href="#6.8.3.8 While-statements">6.8.3.8</a></b>     while-statement = 'while' Boolean-expression 'do' statement.</pre>
<pre><b><a href="#6.8.3.10 With-statements">6.8.3.10</a></b>    with-statement = 'with' record-variable-list 'do' statement.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.1.2 Special-symbols">6.1.2</a></b>       word-symbol = 'and' | 'array' | 'begin' | 'case' | 'const' | 'div'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        | 'do' | 'downto' | 'else' | 'end' | 'file' | 'for'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        | 'function' | 'goto' | 'if' | 'in' | 'label' | 'mod'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        | 'nil' | 'not' | 'of' | 'or' | 'packed' | 'procedure'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        | 'program' | 'record' | 'repeat' | 'set' | 'then'</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                        | 'to' | 'type' | 'until' | 'var' | 'while' | 'with'.</pre>
<pre><b><a href="#6.9.3 The procedure write">6.9.3</a></b>       write-parameter = expression [ ':' expression [ ':' expression ] ].</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.9.3 The procedure write">6.9.3</a></b>       write-parameter-list = '(' [ file-variable ',' ] write-parameter</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                   { ',' write-parameter } ')'.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><a href="#6.9.4 The procedure writeln">6.9.4</a></b>       writeln-parameter-list = [ '(' ( file-variable | write-parameter )</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                                     { ',' write-parameter } ')' ].</pre>
<h1 align="center"><a name="Annex B">Annex B</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Cross-references</h2>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">access                   <a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a><b>       </b><a href="#6.5.3.1 General"><b>6.5.3.1</b></a><b>    </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>       </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>    </b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a><b>   </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>    </b><a href="#6.8.2.2 Assignment-statements"><b>6.8.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.8.3.10 With-statements"><b>6.8.3.10</b></a><b>    </b><a href="#6.10 Programs"><b>6.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">actual &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       &nbsp;<a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>     </b><a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a><b>    </b><a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a></pre>
<ul>
    <pre style="line-height:100%; margin-top:0; margin-bottom:0;">                    <a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>       </b><a href="#6.8.2.3 Procedure-statements"><b>6.8.2.3</b></a><b>    </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a></pre>
</ul>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">actual-parameter         <a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>     </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>    </b><a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a><b>     </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a><b><font color="red">  </font></b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a><b>   </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a><b>    </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">actual-parameter-list    <a href="#6.6.6.5 Boolean functions"><b>6.6.6.5</b></a><b>     </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>      </b><a href="#6.8.2.3 Procedure-statements"><b>6.8.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.9.5 The procedure page"><b>6.9.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">array-type               <a href="#6.4.3.1 General"><b>6.4.3.1</b></a><b>     </b><a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a><b>    </b><a href="#6.5.3.2 Indexed-variables"><b>6.5.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a><b>   </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">assignment-compatible    <a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a><b>       </b><a href="#6.5.3.2 Indexed-variables"><b>6.5.3.2</b></a><b>    </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>     </b><a href="#6.6.5.4 Transfer procedures"><b>6.6.5.4</b></a><b>    </b><a href="#6.8.2.2 Assignment-statements"><b>6.8.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a><b>     </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">assignment-statement     <a href="#6.2.3.3"><b>6.2.3.3</b></a><b>     </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a><b>      </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.8.2.1 General"><b>6.8.2.1</b></a><b>     </b><a href="#6.8.2.2 Assignment-statements"><b>6.8.2.2</b></a><b>    </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">base-type                <a href="#6.4.3.4 Set-types"><b>6.4.3.4</b></a><b>     </b><a href="#6.4.5 Compatible types"><b>6.4.5</b></a><b>      </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.7.1 General"><b>6.7.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">block                    <a href="#6.2.1 Blocks"><b>6.2.1</b></a><b>       </b><a href="#6.2.3.1"><b>6.2.3.1</b></a><b>    </b><a href="#6.2.3.2"><b>6.2.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.2.3.3"><b>6.2.3.3</b></a><b>     </b><a href="#6.2.3.4"><b>6.2.3.4</b></a><b>    </b><a href="#6.3 Constant-definitions"><b>6.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.4.1 General"><b>6.4.1</b></a><b>       </b><a href="#6.4.2.3 Enumerated-types"><b>6.4.2.3</b></a><b>    </b><a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.1 Procedure-declarations"><b>6.6.1</b></a><b>       </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a><b>      </b><a href="#6.6.3.1 General"><b>6.6.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>     </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>    </b><a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a><b>     </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a><b><font color="red">  </font></b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a><b>   </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>      </b><a href="#6.8.1 General"><b>6.8.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.2.3 Procedure-statements"><b>6.8.2.3</b></a><b>     </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a><b>    </b><a href="#6.10 Programs"><b>6.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">body                     <a href="#6.6.1 Procedure-declarations"><b>6.6.1</b></a><b>       </b><a href="#6.8.3.8 While-statements"><b>6.8.3.8</b></a><b>    </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">boolean-expression       <a href="#6.7.2.3 Boolean operators"><b>6.7.2.3</b></a><b>     </b><a href="#6.8.3.4 If-statements"><b>6.8.3.4</b></a><b>    </b><a href="#6.8.3.7 Repeat-statements"><b>6.8.3.7</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.8 While-statements"><b>6.8.3.8</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">boolean-type             <a href="#6.4.2.2 Required simple-types"><b>6.4.2.2</b></a><b>     </b><a href="#6.7.2.3 Boolean operators"><b>6.7.2.3</b></a><b>    </b><a href="#6.7.2.5 Relational operators"><b>6.7.2.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.1 General"><b>6.9.3.1</b></a><b>     </b><a href="#6.8.3.5 Case-statements"><b>6.9.3.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">buffer-variable          <a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a><b>       </b><a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>      </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>       </b><a href="#6.9.3 The procedure write"><b>6.9.3</b></a><b>      </b><a href="#6.9.5 The procedure page"><b>6.9.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.10 Programs"><b>6.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">case-constants           <a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a><b>    </b><a href="#6.9.3.5 Boolean-type"><b>6.8.3.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">char-type                <a href="#6.1.7 Character-strings"><b>6.1.7</b></a><b>       </b><a href="#6.4.2.2 Required simple-types"><b>6.4.2.2</b></a><b>    </b><a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>     </b><a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>      </b><a href="#6.6.6.4 Ordinal functions"><b>6.6.6.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>       </b><a href="#6.9.3.1 Write-parameters"><b>6.9.3.1</b></a><b>    </b><a href="#6.9.3.2 Char-type"><b>6.9.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">character                <a href="#6.1.7 Character-strings"><b>6.1.7</b></a><b>       </b><a href="#6.1.9 Lexical alternatives"><b>6.1.9</b></a><b>      </b><a href="#6.4.2.2 Required simple-types"><b>6.4.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.6.4 Ordinal functions"><b>6.6.6.4</b></a><b>     </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>      </b><a href="#6.9.3.2 Char-type"><b>6.9.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.3.3 Integer-type"><b>6.9.3.3</b></a><b>     </b><a href="#6.9.3.4.1 The floating-point representation"><b>6.9.3.4.1</b></a><b>  </b><a href="#6.9.3.4.2 The fixed-point representation"><b>6.9.3.4.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">character-string         <a href="#6.1.1 General"><b>6.1.1</b></a><b>       </b><a href="#6.1.7 Character-strings"><b>6.1.7</b></a><b>      </b><a href="#6.1.8 Token separators"><b>6.1.8</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.3 Constant-definitions"><b>6.3</b></a><b>         </b><a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a><b>    </b><a href="#6.7.1 General"><b>6.7.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">closed                   <a href="#6.1.5 Numbers"><b>6.1.5</b></a><b>       </b><a href="#6.1.6 Labels"><b>6.1.6</b></a><b>      </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a><b>     </b><a href="#6.7.1 General"><b>6.7.1</b></a><b>      </b><a href="#6.7.2.2 Arithmetic operators"><b>6.7.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">compatible               <a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.4.5 Compatible types"><b>6.4.5</b></a><b>      </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.7 Example of a type-definition-part"><b>6.4.7</b></a><b>       </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a><b>    </b><a href="#6.7.2.5 Relational operators"><b>6.7.2.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">component                <a href="#6.4.3.1 General"><b>6.4.3.1</b></a><b>     </b><a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a><b>    </b><a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>     </b><a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a><b>      </b><a href="#6.5.3.1 General"><b>6.5.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.5.3.2 Indexed-variables"><b>6.5.3.2</b></a><b>     </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a><b>    </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>     </b><a href="#6.6.3.6 Parameter list congruity"><b>6.6.3.6</b></a><b>    </b><a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>     </b><a href="#6.6.6.5 Boolean functions"><b>6.6.6.5</b></a><b>    </b><a href="#6.8.2.2 Assignment-statements"><b>6.8.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.10 With-statements"><b>6.8.3.10</b></a><b>    </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>      </b><a href="#6.9.4 The procedure writeln"><b>6.9.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.5 The procedure page"><b>6.9.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">component-type           <a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a><b>     </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>    </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>       </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>    </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">components               <a href="#6.1.7 Character-strings"><b>6.1.7</b></a><b>       </b><a href="#6.4.3.1 General"><b>6.4.3.1</b></a><b>    </b><a href="#6.4.3.2 Array-types"><b>6.4.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>    </b><a href="#6.4.5 Compatible types"><b>6.4.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a><b>     </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>    </b><a href="#6.8.3.10 With-statements"><b>6.8.3.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.3.6 String-types"><b>6.9.3.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">compound-statement       <a href="#6.2.1 Blocks"><b>6.2.1</b></a><b>       </b><a href="#6.8.1 General"><b>6.8.1</b></a><b>      </b><a href="#6.8.3.1 General"><b>6.8.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.2 Compound-statements"><b>6.8.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">conformant-array-schema  </font><a href="#6.6.3.6 Parameter list congruity"><font color="red"><b>6.6.3.6</b></font></a><font color="red"><b>     </b></font><a href="#6.6.3.7.1 General"><font color="red"><b>6.6.3.7.1</b></font></a><font color="red"><b>  </b></font><a href="#6.6.3.8 Conformability"><font color="red"><b>6.6.3.8</b></font></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">congruous                <a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a><b>     </b><a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a><b>    </b><a href="#6.6.3.6 Parameter list congruity"><b>6.6.3.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">constant                 <a href="#6.3 Constant-definitions"><b>6.3</b></a><b>         </b><a href="#6.4.2.4 Subrange-types"><b>6.4.2.4</b></a><b>    </b><a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.2 Function-declarations"><b>6.6.2</b></a><b>       </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">corresponding            <a href="#1.2"><b>1.2</b></a><b>         </b><a href="#4 Definitional conventions"><b>4</b></a><b>          </b><a href="#6.1.4 Directives"><b>6.1.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.1.9 Lexical alternatives"><b>6.1.9</b></a><b>       </b><a href="#6.2.3.2"><b>6.2.3.2</b></a><b>    </b><a href="#6.2.3.3"><b>6.2.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.1 General"><b>6.4.1</b></a><b>       </b><a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>    </b><a href="#6.5.4 Identified-variables"><b>6.5.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.1 General"><b>6.6.3.1</b></a><b>     </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a><b>    </b><a href="#6.6.3.6 Parameter list congruity"><b>6.6.3.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a><b><font color="red">   </font></b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a><b><font color="red">  </font></b><a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a><b>     6.6.4.1    </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.7.2.2 Arithmetic operators"><b>6.7.2.2</b></a><b>     </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>      </b><a href="#6.8.2.3 Procedure-statements"><b>6.8.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">defining-point           <a href="#6.2.1 Blocks"><b>6.2.1</b></a><b>       </b><a href="#6.2.2.1"><b>6.2.2.1</b></a><b>    </b><a href="#6.2.2.2"><b>6.2.2.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.2.2.3"><b>6.2.2.3</b></a><b>     </b><a href="#6.2.2.4"><b>6.2.2.4</b></a><b>    </b><a href="#6.2.2.5"><b>6.2.2.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.2.2.7"><b>6.2.2.7</b></a><b>     </b><a href="#6.2.2.8"><b>6.2.2.8</b></a><b>    </b><a href="#6.2.2.9"><b>6.2.2.9</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.2.2.11"><b>6.2.2.11</b></a><b>    </b><a href="#6.2.3.1"><b>6.2.3.1</b></a><b>    </b><a href="#6.2.3.2"><b>6.2.3.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.3 Constant-definitions"><b>6.3</b></a><b>         </b><a href="#6.4.1 General"><b>6.4.1</b></a><b>      </b><a href="#6.4.2.3 Enumerated-types"><b>6.4.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a><b>      </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.1 Procedure-declarations"><b>6.6.1</b></a><b>       </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a><b>      </b><a href="#6.6.3.1 General"><b>6.6.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a><b>     </b><a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a><b>    </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.10 With-statements"><b>6.8.3.10</b></a><b>    </b><a href="#6.10 Programs"><b>6.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">definition               <a href="#3.1 Error"><b>3.1</b></a><b>         </b><a href="#4 Definitional conventions"><b>4</b></a><b>          </b><a href="#5.1 Processors"><b>5.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>     </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">directive                <a href="#6.1.4 Directives"><b>6.1.4</b></a><b>       </b><a href="#6.6.1 Procedure-declarations"><b>6.6.1</b></a><b>      </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">entire-variable          <a href="#6.5.1 Variable-declarations"><b>6.5.1</b></a><b>       </b><a href="#6.5.2 Entire-variables"><b>6.5.2</b></a><b>      </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">enumerated-type          <a href="#6.4.2.1 General"><b>6.4.2.1</b></a><b>     </b><a href="#6.4.2.3 Enumerated-types"><b>6.4.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">error                    <a href="#3.1 Error"><b>3.1</b></a><b>         </b><a href="#3.2 Extension"><b>3.2</b></a><b>        </b><a href="#5.1 Processors"><b>5.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a><b>       </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a><b>    </b><a href="#6.5.4 Identified-variables"><b>6.5.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>       </b><a href="#6.6.3.8 Conformability"><b><font color="red">6.6.3.8</font></b></a><b>    </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a><b>     </b><a href="#6.6.6.2 Arithmetic functions"><b>6.6.6.2</b></a><b>    </b><a href="#6.6.6.3 Transfer functions"><b>6.6.6.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.6.4 Ordinal functions"><b>6.6.6.4</b></a><b>     </b><a href="#6.6.6.5 Boolean functions"><b>6.6.6.5</b></a><b>    </b><a href="#6.7.1 General"><b>6.7.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.7.2.2 Arithmetic operators"><b>6.7.2.2</b></a><b>     </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>      </b><a href="#6.8.3.5 Case-statements"><b>6.8.3.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>       </b><a href="#6.9.3 The procedure write"><b>6.9.3</b></a><b>      </b><a href="#6.9.3.1 Write-parameters"><b>6.9.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.9.4 The procedure writeln"><b>6.9.4</b></a><b>       </b><a href="#6.9.5 The procedure page"><b>6.9.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">expression               <a href="#6.5.3.2 Indexed-variables"><b>6.5.3.2</b></a><b>     </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>    </b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>     </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a><b>    </b><a href="#6.6.5.4 Transfer procedures"><b>6.6.5.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.6.2 Arithmetic functions"><b>6.6.6.2</b></a><b>     </b><a href="#6.6.6.3 Transfer functions"><b>6.6.6.3</b></a><b>    </b><a href="#6.6.6.4 Ordinal functions"><b>6.6.6.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.6.5 Boolean functions"><b>6.6.6.5</b></a><b>     </b><a href="#6.7.1 General"><b>6.7.1</b></a><b>      </b><a href="#6.7.2.3 Boolean operators"><b>6.7.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a><b>       </b><a href="#6.8.2.2 Assignment-statements"><b>6.8.2.2</b></a><b>    </b><a href="#6.8.3.5 Case-statements"><b>6.8.3.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.3.9 For-statements"><b>6.8.3.9</b></a><b>     </b><a href="#6.9.3 The procedure write"><b>6.9.3</b></a><b>      </b><a href="#6.9.3.1 Write-parameters"><b>6.9.3.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">factor                   <a href="#6.1.5 Numbers"><b>6.1.5</b></a><b>       </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a><b>  </b><a href="#6.6.5.3 Dynamic allocation procedures"><b>6.6.5.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.7.1 General"><b>6.7.1</b></a><b>       </b><a href="#6.7.2.1 General"><b>6.7.2.1</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">field                    <a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a><b>    </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">field-designator         <a href="#6.2.2.6"><b>6.2.2.6</b></a><b>     </b><a href="#6.5.3.1 General"><b>6.5.3.1</b></a><b>    </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">field-identifier         <a href="#6.4.3.3 Record-types"><b>6.4.3.3</b></a><b>     </b><a href="#6.5.3.3 Field-designators"><b>6.5.3.3</b></a><b>    </b><a href="#6.8.3.10 With-statements"><b>6.8.3.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">file-type                <a href="#6.4.3.1 General"><b>6.4.3.1</b></a><b>     </b><a href="#6.4.3.5 File-types"><b>6.4.3.5</b></a><b>    </b><a href="#6.4.6 Assignment-compatibility"><b>6.4.6</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>       </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>    </b><a href="#6.10 Programs"><b>6.10</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">file-variable            <a href="#6.5.5 Buffer-variables"><b>6.5.5</b></a><b>       </b><a href="#6.6.5.2 File handling procedures"><b>6.6.5.2</b></a><b>    </b><a href="#6.6.6.5 Boolean functions"><b>6.6.6.5</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.9.1 The procedure read"><b>6.9.1</b></a><b>       </b><a href="#6.9.2 The procedure readln"><b>6.9.2</b></a><b>      </b><a href="#6.9.3 The procedure write"><b>6.9.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.9.4 The procedure writeln"><b>6.9.4</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">formal                   <a href="#6.2.3.2"><b>6.2.3.2</b></a><b>     </b><a href="#6.6.1 Procedure-declarations"><b>6.6.1</b></a><b>      </b><a href="#6.6.2 Function-declarations"><b>6.6.2</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <a href="#6.6.3.1 General"><b>6.6.3.1</b></a><b>     </b><a href="#6.6.3.2 Value parameters"><b>6.6.3.2</b></a><b>    </b><a href="#6.6.3.3 Variable parameters"><b>6.6.3.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.4 Procedural parameters"><b>6.6.3.4</b></a><b>     </b><a href="#6.6.3.5 Functional parameters"><b>6.6.3.5</b></a><b>    </b><a href="#6.6.3.7.1 General"><b><font color="red">6.6.3.7.1</font></b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.6.3.7.2 Value conformant arrays"><b><font color="red">6.6.3.7.2</font></b></a><b><font color="red">   </font></b><a href="#6.6.3.7.3 Variable conformant arrays"><b><font color="red">6.6.3.7.3</font></b></a><b>  </b><a href="#6.7.3 Function-designators"><b>6.7.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         </b><a href="#6.8.2.3 Procedure-statements"><b>6.8.2.3</b></a></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">formal-parameter-list    <b><a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.2 Function-declarations">6.6.2</a>      <a href="#6.6.3.1 General">6.6.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.4 Procedural parameters">6.6.3.4</a>     <a href="#6.4.3.5 File-types">6.6.3.5</a>    <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function                 <b><a href="#6.1.2 Special-symbols">6.1.2</a>       <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.3.5 File-types">6.4.3.5</a>     <a href="#6.6 Procedure and function declarations">6.6</a>        <a href="#6.6.1 Procedure-declarations">6.6.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2 Scopes">6.6.2</a>       <a href="#6.6.3.5 Functional parameters">6.6.3.5</a>    <a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>     <a href="#6.6.6.5 Boolean functions">6.6.6.5</a>    <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a>       <a href="#6.9.3.3 Integer-type">6.9.3.3</a>    <a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.4.2 The fixed-point representation">6.9.3.4.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-block           <b><a href="#6.1.4 Directives">6.1.4</a>       <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.2 Function-declarations">6.6.2</a>       <a href="#6.6.3.1 General">6.6.3.1</a>    <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-declaration     <b><a href="#6.1.4 Directives">6.1.4</a>       <a href="#6.2.1 Blocks">6.2.1</a>      <a href="#6.6.2 Function-declarations">6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-designator      <b><a href="#6.2.3.4">6.2.3.4</a>     <a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a>  <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function-identifier      <b><a href="#6.2.3.1">6.2.3.1</a>     <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.2 Function-declarations">6.6.2</a>       <a href="#6.6.3.1 General">6.6.3.1</a>    <a href="#6.6.3.5 Functional parameters">6.6.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a>       <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">goto-statement           <b><a href="#6.8.1 General">6.8.1</a>       <a href="#6.8.2.1 General">6.8.2.1</a>    <a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.1 General">6.8.3.1</a>     <a href="#6.8.3.7 Repeat-statements">6.8.3.7</a>    <a href="#6.8.3.9 For-statements">6.8.3.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">identifier               <b><a href="#4 Definitional conventions">4</a>           <a href="#6.1.3 Identifiers">6.1.3</a>      <a href="#6.2.2.1">6.2.2.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.5">6.2.2.5</a>     <a href="#6.2.2.7">6.2.2.7</a>    <a href="#6.2.2.8">6.2.2.8</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.9">6.2.2.9</a>     <a href="#6.2.2.11">6.2.2.11</a>   <a href="#6.3 Constant-definitions">6.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.1 General">6.4.1</a>       <a href="#6.4.2.3 Enumerated-types">6.4.2.3</a>    <a href="#6.4.3.3 Record-types">6.4.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.1 Variable-declarations">6.5.1</a>       <a href="#6.5.2 Entire-variables">6.5.2</a>      <a href="#6.5.3.3 Field-designators">6.5.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.2 Function-declarations">6.6.2</a>      <a href="#6.6.3.1 General">6.6.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a><font color="red">   </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a>  <a href="#6.8.3.9 For-statements">6.8.3.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.10 With-statements">6.8.3.10</a>    <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">identifier-list          <b><a href="#6.4.2.3 Enumerated-types">6.4.2.3</a>     <a href="#6.4.3.3 Record-types">6.4.3.3</a>    <a href="#6.5.1 Variable-declarations">6.5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.1 General">6.6.3.1</a>     <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a><font color="red">  </font><a href="#6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">implementation-defined   <b><a href="#3.1 Error">3.1</a>         <a href="#3.3 Implementation-defined">3.3</a>        <a href="#5.1 Processors">5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#5.2 Programs">5.2</a>         <a href="#6.1.7 Character-strings">6.1.7</a>      <a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.5.2 File handling procedures">6.6.5.2</a>     <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>    <a href="#6.9.3.1 Write-parameters">6.9.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a>   <a href="#6.9.3.5 Boolean-type">6.9.3.5</a>    <a href="#6.9.5 The procedure page">6.9.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">implementation-dependent <b><a href="#3.2 Extension">3.2</a>         <a href="#3.4 Implementation-dependent">3.4</a>        <a href="#5.1 Processors">5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#5.2 Programs">5.2</a>         <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>    <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.1 General">6.7.2.1</a>     <a href="#6.7.3 Function-designators">6.7.3</a>      <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a>     <a href="#6.9.5 The procedure page">6.9.5</a>      <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">index-type               <b><a href="#6.4.3.2 Array-types">6.4.3.2</a>     <a href="#6.6.3.2 Value parameters">6.5.3.2</a>    <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">indexed-variable         <b><a href="#6.5.3.1 General">6.5.3.1</a>     <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>    <a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">integer-type             <b><a href="#6.1.5 Numbers">6.1.5</a>       <a href="#6.3 Constant-definitions">6.3</a>        <a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.3 Enumerated-types">6.4.2.3</a>     <a href="#6.4.6 Assignment-compatibility">6.4.6</a>      <a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.3 Transfer functions">6.6.6.3</a>     <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>    <a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>     <a href="#6.7.2.5 Relational operators">6.7.2.5</a>    <a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.1 Write-parameters">6.9.3.1</a>     <a href="#6.9.3.3 Integer-type">6.9.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">label                    <b><a href="#6.1.2 Special-symbols">6.1.2</a>       <a href="#6.1.6 Labels">6.1.6</a>      <a href="#6.2.1 Blocks">6.2.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.1">6.2.2.1</a>     <a href="#6.2.2.5">6.2.2.5</a>    <a href="#6.2.2.7">6.2.2.7</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.8">6.2.2.8</a>     <a href="#6.2.2.9">6.2.2.9</a>    <a href="#6.2.2.11">6.2.2.11</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.3.2">6.2.3.2</a>     <a href="#6.2.3.3">6.2.3.3</a>    <a href="#6.8.1 General">6.8.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.4 Goto-statements">6.8.2.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">member                   <b><a href="#6.4.6 Assignment-compatibility">6.4.6</a>       <a href="#6.7.1 General">6.7.1</a>      <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">note                     <b><a href="#3 Definitions">3</a>           <a href="#3.1 Error">3.1</a>        <a href="#3.5 Processor">3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#5 Compliance">5</a>           <a href="#5.1 Processors">5.1</a>        <a href="#5.2 Programs">5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.1 Lexical tokens">6.1</a>         <a href="#6.1.4 Directives">6.1.4</a>      <a href="#6.1.7 Character-strings">6.1.7</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.1.9 Lexical alternatives">6.1.9</a>       <a href="#6.2.2.8">6.2.2.8</a>    <a href="#6.2.2.10">6.2.2.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.11">6.2.2.11</a>    <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.2 Required simple-types">6.4.2.2</a>     <a href="#6.4.3.1 General">6.4.3.1</a>    <a href="#6.4.3.2 Array-types">6.4.3.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.3.3 Record-types">6.4.3.3</a>     <a href="#6.4.3.4 Set-types">6.4.3.4</a>    <a href="#6.4.3.5 File-types">6.4.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.4 Pointer-types">6.4.4</a>       <a href="#6.4.7 Example of a type-definition-part">6.4.7</a>      <a href="#6.5.1 Variable-declarations">6.5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>     <a href="#6.5.3.3 Field-designators">6.5.3.3</a>    <a href="#6.5.4 Identified-variables">6.5.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.1 General">6.6.3.1</a>     <a href="#6.6.3.7 Conformant array parameters"><font color="red">6.6.3.7</font></a><font color="red">    </font><a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><font color="red">                         </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a>  <font color="red"> </font><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a>    6.6.4.1</b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.5.2 File handling procedures">6.6.5.2</a>     <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a>    <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.1 General">6.7.2.1</a>     <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>    <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.1 General">6.8.1</a>       <a href="#6.8.3.4 If-statements">6.8.3.4</a>    <a href="#6.8.3.5 Case-statements">6.8.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.1 The procedure read">6.9.1</a>       <a href="#6.9.2 The procedure readln">6.9.2</a>      <a href="#6.9.3.4.2 The fixed-point representation">6.9.3.4.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.4 The procedure writeln">6.9.4</a>       <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">number                   <b><a href="#5.1 Processors">5.1</a>         <a href="#6.1.7 Character-strings">6.1.7</a>      <a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.3 Enumerated-types">6.4.2.3</a>     <a href="#6.4.3.2 Array-types">6.4.3.2</a>    <a href="#6.4.5 Compatible types">6.4.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.6 Parameter list congruity">6.6.3.6</a>     <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>    <a href="#6.7.3 Function-designators">6.7.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a>     <a href="#6.9.1 The procedure read">6.9.1</a>      <a href="#6.9.3.3 Integer-type">6.9.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.4 Real-type">6.9.3.4</a>     <a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a>  <a href="#6.9.3.4.2 The fixed-point representation">6.9.3.4.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">operand                  <b><a href="#6.7.2.1 General">6.7.2.1</a>     <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>    <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">operator                 <b><a href="#6.5.1 Variable-declarations">6.5.1</a>       <a href="#6.7.1 General">6.7.1</a>      <a href="#6.7.2.1 General">6.7.2.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>     <a href="#6.7.2.4 Set operators">6.7.2.4</a>    <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.5 Case-statements">6.8.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ordinal                  <b><a href="#6.4.2.1 General">6.4.2.1</a>     <a href="#6.4.2.2 Required simple-types">6.4.2.2</a>    <a href="#6.4.2.3 Enumerated-types">6.4.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.1 General">6.6.6.1</a>     <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>    <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ordinal-type             <b><a href="#6.4.2.1 General">6.4.2.1</a>     <a href="#6.4.2.4 Subrange-types">6.4.2.4</a>    <a href="#6.4.3.2 Array-types">6.4.3.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.3.3 Record-types">6.4.3.3</a>     <a href="#6.4.3.4 Set-types">6.4.3.4</a>    <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.1 General">6.7.1</a>       <a href="#6.7.2.5 Relational operators">6.7.2.5</a>    <a href="#6.8.3.5 Case-statements">6.8.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.9 For-statements">6.8.3.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">parameter                <b><a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.3.1 General">6.6.3.1</a>    <a href="#6.6.3.2 Value parameters">6.6.3.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.3 Variable parameters">6.6.3.3</a>     <a href="#6.6.3.4 Procedural parameters">6.6.3.4</a>    <a href="#6.6.3.5 Functional parameters">6.6.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.6 Parameter list congruity">6.6.3.6</a>     <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a><font color="red">  </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><font color="red">                         </font><a href="#6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3</font></a>   <a href="#6.6.5.2 File handling procedures">6.6.5.2</a>    <a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.5 Boolean functions">6.6.6.5</a>     <a href="#6.8.3.9 For-statements">6.8.3.9</a>    <a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.2 The procedure readln">6.9.2</a>       <a href="#6.9.3 The procedure write">6.9.3</a>      <a href="#6.9.3.5 Boolean-type">6.9.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.4 The procedure writeln">6.9.4</a>       <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">pointer                  <b><a href="#6.4.1 General">6.4.1</a>       <a href="#6.5.1 Variable-declarations">6.5.1</a>      <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">pointer-type             <b><a href="#6.4.4 Pointer-types">6.4.4</a>       <a href="#6.5.4 Identified-variables">6.5.4</a>      <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure                <b><a href="#6.1.2 Special-symbols">6.1.2</a>       <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.4 Pointer-types">6.4.4</a>       <a href="#6.5.4 Identified-variables">6.5.4</a>      <a href="#6.6 Procedure and function declarations">6.6</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.3.4 Procedural parameters">6.6.3.4</a>    <a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a>     <a href="#6.8.3.9 For-statements">6.8.3.9</a>    <a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.2 The procedure readln">6.9.2</a>       <a href="#6.9.3 The procedure write">6.9.3</a>      <a href="#6.9.4 The procedure writeln">6.9.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.5 The procedure page">6.9.5</a>       <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-block          <b><a href="#6.1.4 Directives">6.1.4</a>       <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.3.1 General">6.6.3.1</a>    <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-declaration    <b><a href="#6.1.4 Directives">6.1.4</a>       <a href="#6.2.1 Blocks">6.2.1</a>      <a href="#6.6.1 Procedure-declarations">6.6.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-identifier     <b><a href="#6.2.3.1">6.2.3.1</a>     <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.2.3.3">6.2.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.3.1 General">6.6.3.1</a>    <a href="#6.6.3.4 Procedural parameters">6.6.3.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a>       <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure-statement      <b><a href="#6.2.3.4">6.2.3.4</a>     <a href="#6.8.2.1 General">6.8.2.1</a>    <a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.9 For-statements">6.8.3.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">program-parameters       <b><a href="#6.2.3.5">6.2.3.5</a>     <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">real-type                <b><a href="#6.1.5 Numbers">6.1.5</a>       <a href="#6.3 Constant-definitions">6.3</a>        <a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.6 Assignment-compatibility">6.4.6</a>       <a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a>    <a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a>     <a href="#6.7.2.5 Relational operators">6.7.2.5</a>    <a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.1 Write-parameters">6.9.3.1</a>     <a href="#6.9.3.4 Real-type">6.9.3.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">record-type              <b><a href="#6.4.3.1 General">6.4.3.1</a>     <a href="#6.4.3.3 Record-types">6.4.3.3</a>    <a href="#6.5.3.3 Field-designators">6.5.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a>     <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">record-variable          <b><a href="#6.4.3.3 Record-types">6.4.3.3</a>     <a href="#6.6.3.3 Variable parameters">6.5.3.3</a>    <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">reference                <b><a href="#6.5.3.1 General">6.5.3.1</a>     <a href="#6.5.3.3 Field-designators">6.5.3.3</a>    <a href="#6.5.4 Identified-variables">6.5.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <b><a href="#6.5.5 Buffer-variables">6.5.5</a>       <a href="#6.6.3.3 Variable parameters">6.6.3.3</a>    <a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><font color="red">                         </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.3</font></a>   <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a>    <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">region                   <b><a href="#6.2.1 Blocks">6.2.1</a>       <a href="#6.2.2.2">6.2.2.2</a>    <a href="#6.2.2.3">6.2.2.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.4">6.2.2.4</a>     <a href="#6.2.2.5">6.2.2.5</a>    <a href="#6.2.2.6">6.2.2.6</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.7">6.2.2.7</a>     <a href="#6.2.2.10">6.2.2.10</a>   <a href="#6.2.3.1">6.2.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.3.2">6.2.3.2</a>     <a href="#6.3 Constant-definitions">6.3</a>        <a href="#6.4.1 General">6.4.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.3 Enumerated-types">6.4.2.3</a>     <a href="#6.4.3.3 Record-types">6.4.3.3</a>    <a href="#6.5.1 Variable-declarations">6.5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.3.3 Field-designators">6.5.3.3</a>     <a href="#6.6.1 Procedure-declarations">6.6.1</a>      <a href="#6.6.2 Function-declarations">6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.1 General">6.6.3.1</a>     <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a>  <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">result                   <b><a href="#6.2.3.2">6.2.3.2</a>     <a href="#6.2.3.3">6.2.3.3</a>    <a href="#6.2.3.5">6.2.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.1 Procedure-declarations">6.6.1</a>       <a href="#6.6.2 Function-declarations">6.6.2</a>      <a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.3 Transfer functions">6.6.6.3</a>     <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>    <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.4 Set operators">6.7.2.4</a>     <a href="#6.7.2.5 Relational operators">6.7.2.5</a>    <a href="#6.7.3 Function-designators">6.7.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">same                     <b><a href="#3.5 Processor">3.5</a>         <a href="#5.2 Programs">5.2</a>        <a href="#6.1 Lexical tokens">6.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.1.3 Identifiers">6.1.3</a>       <a href="#6.1.4 Directives">6.1.4</a>      <a href="#6.1.7 Character-strings">6.1.7</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.3.3">6.2.3.3</a>     <a href="#6.4.1 General">6.4.1</a>      <a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.4 Subrange-types">6.4.2.4</a>     <a href="#6.4.3.2 Array-types">6.4.3.2</a>    <a href="#6.4.5 Compatible types">6.4.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.6 Assignment-compatibility">6.4.6</a>       <a href="#6.4.7 Example of a type-definition-part">6.4.7</a>      <a href="#6.5.3.1 General">6.5.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>     <a href="#6.6.3.2 Value parameters">6.6.3.2</a>    <a href="#6.6.3.3 Variable parameters">6.6.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.5 Functional parameters">6.6.3.5</a>     <a href="#6.6.3.6 Parameter list congruity">6.6.3.6</a>    <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><font color="red">                         </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a>   <a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a>    <a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.6.4 Ordinal functions">6.6.6.4</a>     <a href="#6.7.1 General">6.7.1</a>      <a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.4 Set operators">6.7.2.4</a>     <a href="#6.7.2.5 Relational operators">6.7.2.5</a>    <a href="#6.8.3.5 Case-statements">6.8.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">scope                    <b><a href="#6.2 Blocks, scopes, and activations">6.2</a>         <a href="#6.2.2 Scopes">6.2.2</a>      <a href="#6.2.2.2">6.2.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.2.2.4">6.2.2.4</a>     <a href="#6.2.2.5">6.2.2.5</a>    <a href="#6.2.2.8">6.2.2.8</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">set-type                 <b><a href="#6.4.3.1 General">6.4.3.1</a>     <a href="#6.4.3.4 Set-types">6.4.3.4</a>    <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">statement                <b><a href="#6.2.1 Blocks">6.2.1</a>       <a href="#6.2.3.2">6.2.3.2</a>    <a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.1 General">6.8.1</a>       <a href="#6.8.2.1 General">6.8.2.1</a>    <a href="#6.8.3.1 General">6.8.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.4 If-statements">6.8.3.4</a>     <a href="#6.8.3.5 Case-statements">6.8.3.5</a>    <a href="#6.8.3.8 While-statements">6.8.3.8</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.9 For-statements">6.8.3.9</a>     <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">string-type              <b><a href="#6.1.7 Character-strings">6.1.7</a>       <a href="#6.4.3.2 Array-types">6.4.3.2</a>    <a href="#6.4.5 Compatible types">6.4.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.6 Assignment-compatibility">6.4.6</a>       <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a>  <a href="#6.7.2.5 Relational operators">6.7.2.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.3.1 Write-parameters">6.9.3.1</a>     <a href="#6.9.3.6 String-types">6.9.3.6</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">structured-type          <b><a href="#6.4.3.1 General">6.4.3.1</a>     <a href="#6.4.3.5 File-types">6.4.3.5</a>    <a href="#6.5.1 Variable-declarations">6.5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">subrange                 <b><a href="#6.4.2.4 Subrange-types">6.4.2.4</a>     <a href="#6.4.5 Compatible types">6.4.5</a>      <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">textfile                 <b><a href="#6.4.3.5 File-types">6.4.3.5</a>     <a href="#6.5.5 Buffer-variables">6.5.5</a>      <a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.1 The procedure read">6.9.1</a>       <a href="#6.9.2 The procedure readln">6.9.2</a>      <a href="#6.9.3 The procedure write">6.9.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.4 The procedure writeln">6.9.4</a>       <a href="#6.9.5 The procedure page">6.9.5</a>      <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">token                    <b><a href="#4 Definitional conventions">4</a>           <a href="#6.1 Lexical tokens">6.1</a>        <a href="#6.1.1 General">6.1.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.1.2 Special-symbols">6.1.2</a>       <a href="#6.1.8 Token separators">6.1.8</a>      <a href="#6.1.9 Lexical alternatives">6.1.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">totally-undefined        <b><a href="#6.2.3.5">6.2.3.5</a>     <a href="#6.5.3.3 Field-designators">6.5.3.3</a>    <a href="#6.6.6.2 Arithmetic functions">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a>     <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a>    <a href="#6.9.4 The procedure writeln">6.9.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.5 The procedure page">6.9.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type-identifier          <b><a href="#6.2.2.9">6.2.2.9</a>     <a href="#6.2.2.11">6.2.2.11</a>   <a href="#6.4.1 General">6.4.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.2.1 General">6.4.2.1</a>     <a href="#6.4.4 Pointer-types">6.4.4</a>      <a href="#6.6.3.1 General">6.6.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.2 Value parameters">6.6.3.2</a>     <a href="#6.6.3.3 Variable parameters">6.6.3.3</a>    <a href="#6.6.3.6 Parameter list congruity">6.6.3.6</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a>   <a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a>    <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">undefined                <b><a href="#6.5.3.3 Field-designators">6.5.3.3</a>     <a href="#6.5.4 Identified-variables">6.5.4</a>      <a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">                         <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a>     <a href="#6.6.6.5 Boolean functions">6.6.6.5</a>    <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.3 Function-designators">6.7.3</a>       <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a>    <a href="#6.8.3.9 For-statements">6.8.3.9</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.1 The procedure read">6.9.1</a>       <a href="#6.9.3 The procedure write">6.9.3</a>      <a href="#6.9.4 The procedure writeln">6.9.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">variable                 <b><a href="#6.2.3.2">6.2.3.2</a>     <a href="#6.2.3.3">6.2.3.3</a>    <a href="#6.4.1 General">6.4.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.4.3.5 File-types">6.4.3.5</a>     <a href="#6.4.4 Pointer-types">6.4.4</a>      <a href="#6.5.1 Variable-declarations">6.5.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.3.1 General">6.5.3.1</a>     <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>    <a href="#6.5.3.3 Field-designators">6.5.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.4 Identified-variables">6.5.4</a>       <a href="#6.5.5 Buffer-variables">6.5.5</a>      <a href="#6.6.3.1 General">6.6.3.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.2 Value parameters">6.6.3.2</a>     <a href="#6.6.3.3 Variable parameters">6.6.3.3</a>    <a href="#6.6.3.7.1 General"><font color="red">6.6.3.7.1</font></a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b><font color="red">                         </font><a href="#6.6.3.7.2 Value conformant arrays"><font color="red">6.6.3.7.2</font></a><font color="red">   </font><a href="#6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3</font></a>  <a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a>     <a href="#6.6.5.4 Transfer procedures">6.6.5.4</a>    <a href="#6.7.1 General">6.7.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a>     <a href="#6.8.3.9 For-statements">6.8.3.9</a>    <a href="#6.8.3.10 With-statements">6.8.3.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.9.1 The procedure read">6.9.1</a>       <a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">variable-access          <b><a href="#6.5.1 Variable-declarations">6.5.1</a>       <a href="#6.5.3.2 Indexed-variables">6.5.3.2</a>    <a href="#6.5.3.3 Field-designators">6.5.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.5.4 Identified-variables">6.5.4</a>       <a href="#6.5.5 Buffer-variables">6.5.5</a>      <a href="#6.6.3.4 Procedural parameters">6.6.3.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.6.3.7.3 Variable conformant arrays"><font color="red">6.6.3.7.3</font></a>   <a href="#6.6.5.2 File handling procedures">6.6.5.2</a>    <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.7.1 General">6.7.1</a>       <a href="#6.7.3 Function-designators">6.7.3</a>      <a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;"><b>                         <a href="#6.8.3.9 For-statements">6.8.3.9</a>     <a href="#6.9.1 The procedure read">6.9.1</a>      <a href="#6.9.2 The procedure readln">6.9.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">variant                  <b><a href="#6.4.3.3 Record-types">6.4.3.3</a>     <a href="#6.5.3.3 Field-designators">6.5.3.3</a>    <a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">word-symbol              <b><a href="#6.1.2 Special-symbols">6.1.2</a>       <a href="#6.1.3 Identifiers">6.1.3</a>      <a href="#6.1.4 Directives">6.1.4</a></b></pre>
<h1 align="center"><a name="Annex C">Annex C</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Required identifiers</h2>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Identifier &nbsp;&nbsp;&nbsp;Reference(s)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">abs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">arctan &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">Boolean &nbsp;&nbsp;&nbsp;   <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">chr &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">cos &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">dispose       <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">eof           <b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">eoln          <b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">exp           <b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">false         <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">get           <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">input         <b><a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">integer       <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ln            <b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">maxint        <b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">new           <b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">odd           <b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ord           <b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">output        <b><a href="#6.10 Programs">6.10</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">pack          <b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">page          <b><a href="#6.9.5 The procedure page">6.9.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">pred          <b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">put           <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">read          <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>, <b><a href="#6.9.1 The procedure read">6.9.1</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">readln        <b><a href="#6.9.2 The procedure readln">6.9.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">real          <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">reset         <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">rewrite       <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">round         <b><a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sin           <b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sqr           <b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sqrt          <b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">succ          <b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">text          <b><a href="#6.4.3.5 File-types">6.4.3.5</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">true          <b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">trunc         <b><a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">unpack        <b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">write         <b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b>, <b><a href="#6.9.3 The procedure write">6.9.3</a></b></pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln       <b><a href="#6.9.4 The procedure writeln">6.9.4</a></b></pre>
<h1 align="center"><a name="Annex D">Annex D</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Errors</h2>
<p>A complying processor is required to provide documentation concerning its 
treatment of errors. To facilitate the production of such documentation, all the errors specified 
in clause 6 are described again in this annex.</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">D.1 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.3.2 Indexed-variables">6.5.3.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For an indexed-variable closest-containing a single index-expression, it 
is an error if the value of the index-expression is not assignment-compatible with the index-type 
of the array-type.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">D.2 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.3.3 Field-designators">6.5.3.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error unless a variant is active for the entirety of each reference 
and access to each component of the variant.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.3 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.4 Identified-variables">6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the pointer-variable of an identified-variable denotes 
a nil-value.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.4 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.4 Identified-variables">6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the pointer-variable of an identified-variable is undefined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.5 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.4 Identified-variables">6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error to remove from its pointer-type the identifying-value of an 
identified-variable when a reference to the identified-variable exists.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.6 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.5 Buffer-variables">6.5.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error to alter the value of a file-variable f when a reference to 
the buffer-variable f^ exists.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.7 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.3.2 Value parameters">6.6.3.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the value of each corresponding actual value parameter 
is not assignmentcompatible with the type possessed by the formal-parameter.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.8 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.3.2 Value parameters">6.6.3.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For a value parameter, it is an error if the actual-parameter is an expression 
of a set-type whose value is not assignment-compatible with the type possessed by the formal-parameter.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.9 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the file mode is not Generation immediately prior to any 
use of put, write, writeln or page.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.10 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the file is undefined immediately prior to any use of put, 
write, writeln or page.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.11 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if end-of-file is not true immediately prior to any use of 
put, write, writeln or page.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.12 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the buffer-variable is undefined immediately prior to any 
use of put.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.13 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the file is undefined immediately prior to any use of reset.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.14 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the file mode is not Inspection immediately prior to any 
use of get or read.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.15 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the file is undefined immediately prior to any use of get 
or read.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.16 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if end-of-file is true immediately prior to any use of get 
or read.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.17 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For read, it is an error if the value possessed by the buffer-variable is 
not assignmentcompatible with the variable-access.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.18 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For write, it is an error if the value possessed by the expression is not 
assignment-compatible with the buffer-variable.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.19 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For new(p,c l ,...,c n,), it is an error if a variant of a variant-part 
within the new variable becomes active and a different variant of the variant-part is one of the specified 
variants.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.20 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For dispose(p), it is an error if the identifying-value had been created 
using the form new(p,c l ,...,c n ).</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.21 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For dispose(p,k l ,...,k, ), it is an error unless the variable had been 
created using the form new(p,c l ,...,c,,,) and m is equal to n.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.22 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For dispose(p,k l ,...,k, ), it is an error if the variants in the variable 
identified by the pointer value of p are different from those specified by the case-constants k l ,...,k,,,,.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.23 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For dispose, it is an error if the parameter of a pointer-type has a nil-value.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.24 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For dispose, it is an error if the parameter of a pointer-type is undefined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.25 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.3 Dynamic allocation procedures">6.6.5.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if a variable created using the second form of new is accessed 
by the identifiedvariable of the variable-access of a factor, of an assignment-statement, or of an 
actual-parameter.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.26 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For pack, it is an error if the parameter of ordinal-type is not assignment-compatible 
with the index-type of the unpacked array parameter.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.27 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For pack, it is an error if any of the components of the unpacked array are 
both undefined and accessed.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.28 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For pack, it is an error if the index-type of the unpacked array is exceeded.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.29 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For unpack, it is an error if the parameter of ordinal-type is not assignment-compatible 
with the index-type of the unpacked array parameter.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.30 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For unpack, it is an error if any of the components of the packed array are 
undefined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.31 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.4 Transfer procedures">6.6.5.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For unpack, it is an error if the index-type of the unpacked array is exceeded.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.32 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">Sqr(x) computes the square of x. It is an error if such a value does not 
exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.33 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For ln(x), it is an error if x is not greater than zero.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.34 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.2 Arithmetic functions">6.6.6.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For sqrt(x), it is an error if x is negative.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.35 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For trunc(x), the value of trunc(x) is such that if x is positive or zero 
then 0 &lt; x-trunc(x) &lt; 1; otherwise 1 &lt;x- trunc(x) &lt; 0. It is an error if such a value does 
not exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.36 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For round(x), if x is positive or zero then round(x) is equivalent to trunc(x+0.5), otherwise 
    round(x) is equivalent to trunc(x- 0.5). It is an error if such a value 
does not exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.37 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.3 Transfer functions">6.6.6.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For chr(x), the function returns a result of char-type that is the value 
whose ordinal number is equal to the value of the expression x if such a character value exists. It is an error if such 
    a character value does not exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.38 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For succ(x), the function yields a value whose ordinal number is one greater 
than that of x, if such a value exists. It is an error if such a value does not exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.39 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.4 Ordinal functions">6.6.6.4</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For pred(x), the function yields a value whose ordinal number is one less 
than that of x, if such a value exists. It is an error if such a value does not exist.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.40 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">When eof(f) is activated, it is an error if f is undefined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.41 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">When eoln(f) is activated, it is an error if f is undefined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.42 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.6.5 Boolean functions">6.6.6.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">When eoln(f) is activated, it is an error if eof(f) is true.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.43 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.1 General">6.7.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">An expression denotes a value unless a variable denoted by a variable-access 
contained by the expression is undefined at the time of its use, in which case that use is 
an error.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.44 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">A term of the form x/y is an error if y is zero.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.45 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">A term of the form i div j is an error if j is zero.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.46 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">A term of the form i mod j is an error if j is zero or negative.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.47 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if an integer operation or function is not performed according 
to the mathematical rules for integer arithmetic.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.48 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.3 Function-designators">6.7.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the result of an activation of a function is undefined 
upon completion of the algorithm of the activation.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.49 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For an assignment-statement, it is an error if the expression is of an ordinal-type 
whose value is not assignment-compatible with the type possessed by the variable or function-identifier.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.50 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For an assignment-statement, it is an error if the expression is of a set-type 
whose value is not assignment-compatible with the type possessed by the variable.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.51 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.3.5 Case-statements">6.8.3.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For a case-statement, it is an error if none of the case-constants is equal 
to the value of the case-index upon entry to the case-statement.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.52 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For a for-statement, it is an error if the value of the initial-value is 
not assignment-compatible with the type possessed by the control-variable if the statement of the for-statement 
is executed.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.53 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.3.9 For-statements">6.8.3.9</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For a for-statement, it is an error if the value of the final-value is not 
assignment-compatible with the type possessed by the control-variable if the statement of the for-statement 
is executed.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.54 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.1 The procedure read">6.9.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">On reading an integer from a textfile, after skipping preceding spaces and 
end-of-lines, it is an error if the rest of the sequence does not form a signed-integer.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.55 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.1 The procedure read">6.9.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">On reading an integer from a textfile, it is an error if the value of the 
signed-integer read is not assignment-compatible with the type possessed by variable-access.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.56 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.1 The procedure read">6.9.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">On reading a number from a textfile, after skipping preceding spaces and 
end-of-lines, it is an error if the rest of the sequence does not form a signed-number.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.57 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.1 The procedure read">6.9.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">It is an error if the buffer-variable is undefined immediately prior to any 
use of read.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.58 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.1 Write-parameters">6.9.3.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">On writing to a textfile, the values of TotalWidth and FracDigits are greater 
than or equal to one ; it is an error if either value is less than one.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">D.59 &nbsp;&nbsp;&nbsp;<b><a href="#6.10 Programs">6.10</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The execution of any action, operation, or function, defined to operate on 
a variable, is an error if the variable is a program-parameter and, as a result of the binding of 
the program-parameter, the execution cannot be completed as defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">D.60 &nbsp;&nbsp;&nbsp;</font><b><a href="#6.6.3.8 Conformability"><font color="red">6.6.3.8</font></a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><font color="red">For a conformant array, it is an error if the smallest or largest value specified 
by the index-type of the actual-parameter lies outside the closed interval specified by the 
index-type-specification of the conformant-array-schema.</font></p>
</ul>
<h1 align="center"><a name="Annex E">Annex E</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Implementation-defined features</h2>
<p>A complying processor is required to provide a definition of all the implementation-defined 
features of the language. To facilitate the production of this definition, all the implementation-defined 
aspects specified in clause 6 are listed again in this annex.</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">E.1 &nbsp;&nbsp;&nbsp;<b><a href="#6.1.7 Character-strings">6.1.7</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The string-characters which denote an implementation-defined value of the 
required chartype.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">NOTE -- For processors which compile and execute in different environments, 
the above may require the de fi nition of two character sets and a mapping between the two.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.2 &nbsp;&nbsp;&nbsp;<b><a href="#6.1.9 Lexical alternatives">6.1.9</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">Provision of the reference tokens &quot;, [, and ], of the alternative token 
@, and of the delimiting characters f and g, is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.3 &nbsp;&nbsp;&nbsp;<b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> b)</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The values of the implementation-defined approximation to an implementation-defined 
subset of the real numbers denoted by signed-real.</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">NOTE -- The subset defined above may be by reference to another specification.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.4 &nbsp;&nbsp;&nbsp;<b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> d)</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The values of char-type which are an enumeration of a set of implementation-defined 
characters.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.5 &nbsp;&nbsp;&nbsp;<b><a href="#6.4.2.2 Required simple-types">6.4.2.2</a></b> d)</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The ordinal numbers of each value of char-type are implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.6 &nbsp;&nbsp;&nbsp;<b><a href="#6.4.3.5 File-types">6.4.3.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The set of characters designated prohibited from textfiles is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.7 &nbsp;&nbsp;&nbsp;<b><a href="#6.6.5.2 File handling procedures">6.6.5.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The point at which the file operations rewrite, put, reset, and get are actually 
performed is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.8 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The value denoted by the constant-identifier maxint is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.9 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.2 Arithmetic operators">6.7.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The accuracy of the approximation of the result of the real operations and 
functions to the mathematical result is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.10 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.1 Write-parameters">6.9.3.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The default value of TotalWidth for integer-type is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.11 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.1 Write-parameters">6.9.3.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The default value of TotalWidth for real-type is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.12 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.1 Write-parameters">6.9.3.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The default value of TotalWidth for Boolean-type is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.13 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The value of ExpDigits is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.14 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.4.1 The floating-point representation">6.9.3.4.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The value of the exponent character ('e' or 'E') used on output of values 
of real-type is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.15 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.3.5 Boolean-type">6.9.3.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The case of each character of ' True ' and ' False ' used on output of values 
of Boolean-type is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.16 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.5 The procedure page">6.9.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The effect of the procedure page when applied to a textfile which is in generation 
mode is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.17 &nbsp;&nbsp;&nbsp;<b><a href="#6.10 Programs">6.10</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The binding of a file-type program-parameter is implementation-defined.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">E.18 &nbsp;&nbsp;&nbsp;<b><a href="#6.10 Programs">6.10</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The effect of reset and rewrite on the standard files input and output is 
implementation-defined.</p>
</ul>
<h1 align="center"><a name="Annex F">Annex F</a></h1>
<p align="center">(Informative)</p>
<h2 align="center">Implementation-dependent features</h2>
<p>A complying processor is required to provide documentation concerning the 
implementation-dependent features of the language. To facilitate the production of such documentation, 
all the implementationdependent aspects specified in clause 6 are listed again in this annex.</p>
<ul>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">F.1 &nbsp;&nbsp;&nbsp;<b><a href="#6.4.3.5 File-types">6.4.3.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">For any textfile t, the effect of attributing to a component of either t.L or t.R a member of 
    the characters prohibited from textfiles is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.2 &nbsp;&nbsp;&nbsp;<b><a href="#6.5.3.2 Indexed-variables">6.5.3.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation of the index-expressions of an indexed-variable is 
implementationdependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.3 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.1 General">6.7.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation of expressions of a member-designator is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.4 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.1 General">6.7.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation of the member-designators of a set-constructor is 
implementationdependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.5 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.2.1 General">6.7.2.1</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation of the operands of a dyadic operator is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.6 &nbsp;&nbsp;&nbsp;<b><a href="#6.7.3 Function-designators">6.7.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation, accessing, and binding of the actual-parameters 
of a function-designator</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.7 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.2.2 Assignment-statements">6.8.2.2</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of accessing the variable and evaluating the expression of an assignment-statement</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.8 &nbsp;&nbsp;&nbsp;<b><a href="#6.8.2.3 Procedure-statements">6.8.2.3</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The order of evaluation, accessing, and binding of the actual-parameters 
of a procedurestatement</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.9 &nbsp;&nbsp;&nbsp;<b><a href="#6.9.5 The procedure page">6.9.5</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The effect of inspecting a textfile to which the page procedure was applied 
during generation</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">is implementation-dependent.</p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</p>
    <p style="line-height:100%; margin-top:0; margin-bottom:0;">F.10 &nbsp;&nbsp;&nbsp;<b><a href="#6.10 Programs">6.10</a></b></p>
<p style="line-height:100%; margin-top:0; margin-bottom:0;">The binding of non-file variables denoted by the program-parameters to entities 
external to the program is implementation-dependent.</p>
</ul>
<center>
<hr WIDTH="100%"></center>

<address>
For more information contact: <a href="mailto:samiam@moorecad.com">Scott A. Moore samiam@moorecad.com</a></address>

</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted iso7185.pdf.

cannot compute difference between binary files

Deleted iso7185rules.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
   <meta name="Author" content="Scott A. Moore">
   <title>Rules of ISO 7185 PASCAL</title>
</head>
<body text="#000000" bgcolor="#66FFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000" background="graphpaper.gif">

<center>
    <h1>Rules of ISO 7185 Pascal</h1>
</center>

<hr WIDTH="100%">
<p>This file contains an overview of the basic rules of ISO 7185 Pascal. See 
also the books on the subject. For serious users, I recommend:</p>
<p>Standard Pascal: Users Reference Manual, Doug Cooper</p>
<p>Oh ! Pascal !, Doug Cooper</p>
<p>Both available from Amazon.com.</p>
<p>Note that the following description could be wrong or incomplete.</p>
<hr>
<h2 align="center">Index</h2>
<h3><a href="#Lexography">Lexography</a></h3>
<h3><a href="#Program structure">Program structure</a></h3>
<h3><a href="#Label declaration">Label declaration</a></h3>
<h3><a href="#Constant declaration">Constant declaration</a></h3>
<h3><a href="#Types">Types</a></h3>
<h3><a href="#Variable declaration">Variable declaration</a></h3>
<h3><a href="#Block declaration">Block declaration</a></h3>
<h3><a href="#Declaration order">Declaration order</a></h3>
<h3><a href="#Predefined types">Predefined types</a></h3>
<h3><a href="#Basic types">Basic types</a></h3>
<h3><a href="#Integer types">Integer types</a></h3>
<h3><a href="#Enumerated types">Enumerated types</a></h3>
<h3><a href="#Boolean types">Boolean types</a></h3>
<h3><a href="#Character types">Character types</a></h3>
<h3><a href="#Subrange types">Subrange types</a></h3>
<h3><a href="#Real types">Real types</a></h3>
<h3><a href="#Structured types">Structured types</a></h3>
<h3><a href="#Packing">Packing</a></h3>
<h3><a href="#Set types">Set types</a></h3>
<h3><a href="#Array types">Array types</a></h3>
<h3><a href="#Record types">Record types</a></h3>
<h3><a href="#File types">File types</a></h3>
<h3><a href="#Pointer types">Pointer types</a></h3>
<h3><a href="#Type compatibility">Type compatibility</a></h3>
<h3><a href="#Expressions">Expressions</a></h3>
<h3><a href="#Predefined functions">Predefined functions</a></h3>
<h3><a href="#Statements">Statements</a></h3>
<h3><a href="#Assignment">Assignment</a></h3>
<h3><a href="#If statement">If statement</a></h3>
<h3><a href="#While statement">While statement</a></h3>
<h3><a href="#Repeat statement">Repeat statement</a></h3>
<h3><a href="#For statement">For statement</a></h3>
<h3><a href="#Case statement">Case statement</a></h3>
<h3><a href="#Goto statement">Goto statement</a></h3>
<h3><a href="#Compound statement">Compound statement</a></h3>
<h3><a href="#Procedures and functions">Procedures and functions</a></h3>
<h3><a href="#Predefined procedures and file operations">Predefined procedures and file operations</a></h3>
<h3><a href="#Predefined procedures and text files">Predefined procedures and text files</a></h3>
<h3><a href="#Header files">Header files</a></h3>
<h3><a href="#Packing procedures">Packing procedures</a></h3>
<h3><a href="#Dynamic allocation">Dynamic allocation</a></h3>
<hr>
<h2><a name="Lexography">Lexography</a></h2>
<p>Pascal source consists of identifiers, keywords, numbers and special &nbsp;character 
sequences. A Pascal identifier must begin with 'a' to 'z', but may continue 
with 'a' to 'z' and '0' to '9'. There is no length limit on labels, but there 
may be a practical limit. If the compiler cannot process a source line longer 
than N, you cannot have a label longer than N, since labels may not cross lines.</p>
<p>Keywords (or reserved words) appear just as labels, but have special meaning 
wherever they appear, and may never be used as identifiers:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">and &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array &nbsp;&nbsp;&nbsp;&nbsp;begin &nbsp;&nbsp;&nbsp;&nbsp;case &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const &nbsp;&nbsp;&nbsp;&nbsp;div &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">downto &nbsp;&nbsp;else &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function &nbsp;goto</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">if &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label &nbsp;&nbsp;&nbsp;&nbsp;mod &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nil &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">or &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;packed &nbsp;&nbsp;&nbsp;procedure program &nbsp;&nbsp;record &nbsp;&nbsp;&nbsp;repeat &nbsp;&nbsp;&nbsp;set</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">then &nbsp;&nbsp;&nbsp;&nbsp;to &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;until &nbsp;&nbsp;&nbsp;&nbsp;var &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while &nbsp;&nbsp;&nbsp;&nbsp;with</pre>
<p>A number can appear in both integer and real form. Integers will appear as 
a sequence of digits:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">83</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">00004</pre>
<p>Are valid integer numbers. For a number to be taken as &quot;real&quot; (or 
&quot;floating point&quot;) format, it must either have a decimal point, or 
use scientific notation:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">1.0</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">1e-12</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">0.000000001</pre>
<p>Are all valid reals. At least one digit must exist on either side of a decimal 
point. Strings are made up of a sequence of characters between single quotes:</p>
<pre>'string'</pre>
<p>The single quote itself can appear as two single quotes back to back in a 
string:</p>
<pre>'isn''t'</pre>
<p>Finally, special character sequences are one of the following:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.)</pre>
<p>Note that these are just aliases for the same character sequence:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">@ &nbsp;and ^ (or the &quot;up arrow&quot; if allowed in the typeface)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">(. and [</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">.) and ]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">(* and {</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">*) and }</pre>
<p>Spaces and line endings in the source are ignored except that they may act 
as &quot;separators&quot;. No identifier, keyword, special character sequence 
or number may be broken by a separator or other object. No two identifiers, 
keywords or numbers may appear in sequence without an intervening separator:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">MyLabel &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Valid</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">My Label &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Invalid</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin farg := 1 - Valid</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">beginfarg := 1 &nbsp;- Invalid</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">1.0e-12 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Valid</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">1.e-122e-3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Invalid</pre>
<h2><a name="Program structure">Program structure</a></h2>
<p>A Pascal program appears as a nested set of &quot;blocks&quot;, each of which 
has the following form:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">block_type name(parameter [, parameter]...);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">label x[, y]...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">const x = y; </pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[q = r;]...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type x = y;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[q = r;]...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var &nbsp;x[,y]...: z;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[x[,y]...: z;]...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[block]...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;statement[; statement]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end[. | ;]</pre>
<p>Note that:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[option] &nbsp;&nbsp;&nbsp;means optional.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[repeat]... means can appear 0 or more times.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[x | y] &nbsp;&nbsp;&nbsp;&nbsp;means one or the other.</pre>
<p>There are three types of blocks, program, procedure and function. Every program 
must contain a program block, and exactly one program block exists in the source 
file.</p>
<p>Each block has two distinct sections, the declaration and statements sections. 
The declarations immediately before a statement section are considered &quot;local&quot; 
to that section.</p>
<p>The declaration section builds a description of the data used by the coming 
statement section in a logical order. For example, constants are usually used 
to build type declarations, and type declarations are used to build variables, 
and all of these may be used by nested blocks.</p>
<h2><a name="Label declaration">Label declaration</a></h2>
<p>The first declaration, labels, are numeric sequences that denote the target 
of any goto's appearing in the block:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">label 99,</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1234;</pre>
<p>Are valid labels. Labels &quot;appear&quot; to be numbers, and must be in 
the range 0 to 9999. The &quot;appearance&quot; of a number means that:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">label 1,</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;01,</pre>
<p>Are the same label.</p>
<h2><a name="Constant declaration">Constant declaration</a></h2>
<p>Constant declarations introduce fixed valued data as a specified identifier:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">const x = 10;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q= -1;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = 'hi there';</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r = 1.0e-12;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z = x;</pre>
<p>Are all valid constant declarations. Only integer, real and character constants 
may be so defined (no sets may appear).</p>
<h2><a name="Types">Types</a></h2>
<p>The type declaration allows types to be given names, and are used to create 
variables later:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type x = array [1..10] of integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z = x;</pre>
<p>Types can be new types, aliases of old types, etc.</p>
<h2><a name="Variable declaration">Variable declaration</a></h2>
<p>Variables set aside computer storage for a element of the given type:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var x, y: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;z: &nbsp;&nbsp;&nbsp;array [1..10] of char;</pre>
<h2><a name="Block declaration">Block declaration</a></h2>
<p>A block can be declared within a block, and that block can declare blocks 
within it, etc. There is no defined limit as to the nesting level. Because only 
one program block may exist, by definition all &quot;sub blocks&quot; must be 
either procedure or function blocks. Once defined, a block may be accessed by 
the block it was declared in. But the &quot;surrounding&quot; block cannot access 
blocks that are declared within such blocks:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">program test;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure junk;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure trash;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin { trash }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end; &nbsp;{ trash }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin { junk }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;trash;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end; &nbsp;{ junk }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin { test }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;junk;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end. &nbsp;{ test }</pre>
<p>Here test can call junk, but only junk can call trash. Trash is &quot;hidden&quot; 
from the view of test. Similarly, a subblock can access any of the variables 
or other blocks that are defined in surrounding blocks:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">program test;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var x;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure q;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure y;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;q;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;x := 1</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;y;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;writeln('x')</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end.</pre>
<p>The variable &quot;x&quot; can be accessed from all blocks declared within 
the same block. It is also possible for a block to call itself, or another block 
that calls it. This means that recursion is allowed in Pascal.</p>
<h2><a name="Declaration order">Declaration order</a></h2>
<p>Every identifier must be declared before it is used, with only one exception, 
pointers, which are discussed later. But there is a way to declare procedures 
and functions before they are fully defined to get around problems this may 
cause.</p>
<h2><a name="Predefined types">Predefined types</a></h2>
<p>Several types are predeclared in Pascal. These include integer, boolean, 
char, real and text. predeclared types, just as predeclared functions and procedures, 
exist in a conceptual &quot;outer block&quot; around the program, and can be 
replaced by other objects in the program.</p>
<h2><a name="Basic types">Basic types</a></h2>
<p>Types in Pascal can be classed as ordinal, real and structured. The ordinal 
and real types are referred to as the &quot;basic&quot; types, because they 
have no complex internal structure. &nbsp;Ordinal types are types whose elements 
can be numbered, and there are a &nbsp;finite number of such elements.</p>
<h2><a name="Integer types">Integer types</a></h2>
<p>The basic ordinal type is &quot;integer&quot;, and typically it represents 
the accuracy of a single word on the target machine:</p>
<pre>var i: integer;</pre>
<p>A predefined constant exists, &quot;maxint&quot;, which tells you what the 
maximum integral value of an integer is. So:</p>
<pre>type integer = -maxint..maxint;</pre>
<p>Would be identical to the predefined type &quot;integer&quot;. Specifically, 
the results of any operation involving ordinals will only be error free if they 
lie within -maxint to +maxint. Although other ordinal types exist in Pascal, 
all such types have a mapping into the type &quot;integer&quot;, and are bounded 
by the same rules. The &quot;ord&quot; function can be used on any ordinal to 
find the corresponding integer.</p>
<h2><a name="Enumerated types">Enumerated types</a></h2>
<p>Enumerated types allow you to specify an identifier for each and every value 
of an ordinal:</p>
<pre>type x = (one, two, three, four);</pre>
<p>Introduces four new identifiers, each one having a constant value in sequence 
from the number 0. So for the above:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">one &nbsp;&nbsp;= 0</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">two &nbsp;&nbsp;= 1</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">three = 2</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">four &nbsp;= 3</pre>
<p>Enumerated types may have no relationship to numbers whatever:</p>
<pre>type y = (red, green, blue);</pre>
<p>Or some relationship:</p>
<pre>type day = (mon, tue, wed, thur, fri, sat, sun);</pre>
<p>Here the fact that &quot;day&quot;s are numbers (say, isn't that a lyric 
?) is useful because the ordering has real world applications:</p>
<pre>if mon &lt; fri then writeln('yes');</pre>
<p>And of course, subranges of enumerated types are quite possible:</p>
<pre>type workday = (mon..fri);</pre>
<p>Enumerated types are fundamentally different from integer and subrange types 
in the fact that they cannot be freely converted to and from each other. There 
is only one conversion direction defined, to integer, and that must be done 
by special predefined function:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var i: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;d: day;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">i := ord(d); { find integral value of d }</pre>
<h2><a name="Boolean types">Boolean types</a></h2>
<p>The only predefined enumerated type is &quot;boolean&quot;, which could be 
declared:</p>
<pre>type boolean = (false, true);</pre>
<p>However, booleans cannot be cross converted (being enumerated types), this 
user created type could not in fact be used just as the predeclared one. Booleans 
are special in that several predefined procedures, and all of the Comparison 
operators (&quot;=&quot;, &quot;&gt;&quot;, etc.) give boolean results. In addition, 
several special operators are defined just for booleans, such as &quot;and&quot;, 
&quot;or&quot; etc.</p>
<h2><a name="Character types">Character types</a></h2>
<p>Character types in Pascal hold the values of the underlying character set, 
usually ISO single byte encoded (including ASCII). The Pascal standard makes 
no requirements as to what characters will be present or what order they will 
appear in. However, as a practical matter, most Pascal programs rely on the 
characters of the alphabet and the digits '0'-'9' being present, and that these 
are numbered sequentially (which leaves out EBCDIC, for example). A character 
declaration appears as:</p>
<pre>var c: char;</pre>
<p>Character values can also be converted to and from integers at will, but 
only by using the special functions to do so:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ord(c); { find integer value of character }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">chr(i); { find character value of integer }</pre>
<h2><a name="Subrange types">Subrange types</a></h2>
<p>Subrange types are simply a voluntary programmer restriction of the values 
an ordinal type may hold:</p>
<pre>type constrained = -10..50;</pre>
<p>(the notation x..y means all values from x to y inclusive.)</p>
<p>It is an error to assign a value outside of the corresponding range to a 
variable of that type:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var x: constrained</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">x := 100; { invalid! }</pre>
<p>But note that there are no restrictions on the USE of such a type:</p>
<pre>writeln('The sum is: ', x+100);</pre>
<p>Here, even though the result of x+100 is greater than the type of x, it is 
not an error. When used in an expression, a subrange is directly equivalent 
to the type &quot;integer&quot;.</p>
<p>Subranges can be declared of any ordinal type:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type enum = (one, two, three, four, five, six, seven, eight, nine, ten);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var e: three..seven;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var c: 'a'..'z';</pre>
<p>Etc.</p>
<h2><a name="Real types">Real types</a></h2>
<p>Real types, or &quot;floating point&quot;, allow approximations of a large 
range of numbers to be stored. The tradeoff is that reals have no direct ordinality 
(cannot be counted), and so have no direct relationship with integers. Real 
types are the only basic type which is not ordinal.</p>
<pre>var r: real;</pre>
<p>Integers are considered &quot;promotable&quot; to reals. That is, is is assumed 
that an integer can always be represented as a real. However, there may be a 
loss of precision when this is done (because the mantissa of a real may not 
be as large as an integer). Reals are never automatically promoted to integer, 
however, and the programmer must choose between finding the nearest whole number 
to the real, or simply discarding the fraction. This choice must be made explicitly 
by predefined function.</p>
<h2><a name="Structured types">Structured types</a></h2>
<p>A structured type is a type with a complex internal structure. In fact, the 
structured types all have one thing in common: they can hold more than one basic 
type object at one time. They are structured because they are &quot;built up&quot; 
from basic types, and from other structured types.</p>
<h2><a name="Packing">Packing</a></h2>
<p>Structured types can also be &quot;packed&quot;, which is indicated by the 
keyword &quot;packed&quot; before the type declaration. Packing isn't supposed 
to change the function of the program at all. Stripping the &quot;packed&quot; 
keywords out of a program will not change the way it works (with the exception 
of &quot;strings&quot;, below). Packing means that (if implemented: its optional) 
the program should conserve space by placing the values in as few bits as possible, 
even if this takes more code (and time) to perform.</p>
<p>Packing is better understood if you understand the state of computers before 
Microprocessors (the Jurassic age of computers ?). Most mainframe computers 
access memory as a single word size only, and not even a neat multiple of 8 
bits either (for example, 36 bit computer; the CDC 6000 has 60 bit words). The 
machine reads or writes in words only. There is no byte access, no even/odd 
addressing, etc. Because storage on such a machine of small items could be wasteful 
(especially characters), programs often pack many single data items into a single 
word.</p>
<p>The advent of the Minicomputer changed that. DEC started with an 8 bit machine 
(just as microprocessors did), and when they changed to 16, then 32 bits the 
&nbsp;ability to address single bytes was maintained.</p>
<p>For this reason, many people refer to such a machine as &quot;automatically 
packed&quot;, or that Pascal's packing feature is unnecessary on such machines. 
However, &nbsp;quantizing data by 8 bit bytes is not necessarily the most extreme 
packing method available. For example, a structure of boolean values, which 
take up only 1 bit per element, left to byte packing would waste 7/8s of the 
storage allocated.</p>
<h2><a name="Set types">Set types</a></h2>
<p>Set types are perhaps the most radical feature of Pascal. A set type can 
be thought of as an array of bits indicating the presence or absence of each 
value in the base type:</p>
<pre>var s: set of char;</pre>
<p>Would declare a set containing a yes/present or no/not present indicator 
for each character in the computer's character set. The base type of a set must 
be ordinal.</p>
<h2><a name="Array types">Array types</a></h2>
<p>The most basic structured type is the array. Pascal is unusual in that both 
the upper and lower bounds of arrays are declared (instead of just the upper 
bound or length), and that the index type can be any ordinal type:</p>
<pre>var a: array [1..10] of integer;</pre>
<p>Would declare an array of 10 integers with indexes from 1 to 10. You may 
recognize the index declaration as a subrange, and indeed any subrange type 
can be used as an index type:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type sub = 0..99;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var a: array [sub] of integer;</pre>
<p>Arrays can also be declared as multidimensional:</p>
<pre>var a: array [1..10] of array [1..10] of char;</pre>
<p>There is also a shorthand form for array declarations:</p>
<pre>var a: array [1..10, 1..10] of char;</pre>
<p>Is equivalent to the last declaration.</p>
<p>A special type of array definition is a &quot;string&quot;. Strings are arrays 
of packed characters, with integer indexes, whose lower bound is 1:</p>
<pre>var s: packed array [1..10] of char;</pre>
<p>String types are special in that any two strings with the same number of 
components are compatible with each other, including constant strings.</p>
<h2><a name="Record types">Record types</a></h2>
<p>Records give the ability to store completely different component types together 
as a unit. There they can be manipulated, copied and passed as a unit. It is 
also possible to create different typed objects that occupy the same storage 
space. </p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var r: record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b: char</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;</pre>
<p>Gives a single variable with two completely different components, which can 
be accessed independently, or used as a unit.</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var vr: record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case b: boolean of { variant }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true: (c: integer; d: char);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false: (e: real)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ end }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;</pre>
<p>Variant records allow the same &quot;collection of types&quot;, but introduce 
the idea that not all of the components are in use at the same time, and thus 
can occupy the same storage area. In the above definition, a, b, c, d, and e 
are all elements of the record, and can be addressed individually. However, 
there are three basic &quot;types&quot; of record elements in play:</p>
<p>1. &quot;base&quot; or normal fixed record elements, such as a.</p>
<p>2. The &quot;tagfield&quot; element. Such as b.</p>
<p>3. The &quot;variants&quot;, such as c, d, and e.</p>
<p>All the elements before the case variant are normal record elements and are 
always present in the record. The tagfield is also always present, but has special 
function with regards to the variant. It must be an ordinal type, and ALL of 
it's possible values must be accounted for by a corresponding variant. The tagfield 
gives both the program and the compiler the chance to tell what the rest of 
the record holds (ie., what case variant is &quot;active&quot;). The tagfield 
can also be omitted optionally:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var vr: record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case boolean of { variant }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true: (c: integer; d: char);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false: (e: real)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ end }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;</pre>
<p>In this case, the variant can be anything the program says it is, without 
&nbsp;checking. The variants introduce what essentially is a &quot;sub record&quot; 
definition that gives the record elements that are only present if the selecting 
variant is &quot;active&quot;. A variant can hold any number of such elements. 
If the compiler chooses to implement variants, the total size of the resulting 
record will be no larger than the fixed record parts plus the size of the &nbsp;largest 
variant. It is possible for the compiler to treat the variant as a normal record, 
&nbsp;allocating each record element normally, in which case the variant record 
would be no different from a normal record.</p>
<h2><a name="File types">File types</a></h2>
<p>Files are identical to arrays in that they store a number of identical components. 
Files are different from arrays in that the number of components they may store 
is not limited or fixed beforehand. The number of components in a file can change 
during the run of a program. A file can have any type as a component type, with 
the exception of other file types. This rule is strict: you may not even have 
structures which contain files as components. A typical file declaration is:</p>
<pre>var f: file of integer;</pre>
<p>Would declare a file with standard integer components. A special predefined 
file type exists:</p>
<pre>var f: text;</pre>
<p>Text files are supposedly equivalent to:</p>
<pre>type text = file of char;</pre>
<p>But there are special procedures and functions that apply to text files only.</p>
<h2><a name="Pointer types">Pointer types</a></h2>
<p>Pointers are indirect references to variables that are created at runtime:</p>
<pre>var ip: ^integer;</pre>
<p>Pointers are neither basic or structured types (they are not structured because 
they do not have multiple components). Any type can be pointed to. In practice, 
pointers allow you to create a series of unnamed components which can be arranged 
in various ways. The type declaration for pointers is special in that the type 
&nbsp;specified to the right of &quot;^&quot; must be a type name, not a full 
type specification. Pointer declarations are also special in that a pointer 
type can be declared using base types that have not been declared yet:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type rp: ^rec;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rec: record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next: rp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;val: &nbsp;integer</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;</pre>
<p>The declaration for rp contains a reference to an undeclared type, rec. This 
&quot;forward referencing&quot; of pointers allows recursive definition of pointer 
types, essential in list processing.</p>
<h2><a name="Type compatibility">Type compatibility</a></h2>
<p>Type compatibility (ability to use two different objects in relation to each 
other), occurs on three different levels:</p>
<p>1. Two types are identical.</p>
<p>2. Two types are compatible.</p>
<p>3. Two types are assignment compatible.</p>
<p>Two types are identical if the exact same type definition was used to create 
the objects in question. This can happen in several different ways. Two objects 
can be declared in the same way:</p>
<pre>var a, b: array [1..10] of record a, b: integer end;</pre>
<p>Here a and b are the same (unnamed) type. They can also be declared using 
the same type name:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type mytype = record a, b: integer end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var a: mytype;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;b: mytype;</pre>
<p>Finally, an &quot;alias&quot; can be used to create types:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">type mytype = array [1..10] of integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myother = mytype;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var a: mytype;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;b: myother;</pre>
<p>Even though an alias is used, these objects till have the same type. Two 
types are considered compatible if:</p>
<p>1. They are identical types (as described above).</p>
<p>2. Both are ordinal types, and one or both are subranges of an identical 
type.</p>
<p>3. Both are sets with compatible base types and &quot;packed&quot; status.</p>
<p>4. Both are string types with the same number of components.</p>
<p>Finally, two types are assignment compatible if:</p>
<p>1. The types are compatible, as described above.</p>
<p>2. Neither is a file, or has components of file type.</p>
<p>3. The destination is real, and the source is integer (because integers can 
always be promoted to real, as above).</p>
<p>4. The source &quot;fits&quot; within the destination. If the types are subranges 
of the same base type, the source must fall within the destination's range:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var x: 1..10;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">x := 1; { legal }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">x := 20; { not legal }</pre>
<p>5. Both are sets, and the source &quot;fits&quot; within the destination. 
If the base types of the sets are subranges, all the source elements must also 
exist in the destination:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var s1: set of 1..10;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">s1 := [1, 2, 3]; { legal }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">s1 := [1, 15]; { not legal } </pre>
<h2><a name="Expressions">Expressions</a></h2>
<p>The basic operands in Pascal are:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">xxx &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Integer constant. A string of digits, without sign, whose</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value is bounded by -maxint..maxint.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">x.xex &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Real constant.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">'string' &nbsp;&nbsp;- String constant.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">[set] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Set constant. A set constant consists of zero or more elements</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separated by &quot;,&quot;:</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1, 2, 3]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A range of elements can also appear:</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1, 2..5, 10]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The elements of a set must be of the same type, and the </pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;apparent&quot; base type of the set is the type of the elements.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The packed or unpacked status of the set is whatever is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required for the context where it appears.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ident &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Identifier. Can be a variable or constant from a const </pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;declaration.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">func(x, y) - A function call. Each parameter is evaluated, and the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function called. The result of the function is then used</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in the encompassing expression.</pre>
<p>The basic construct built on these operands is a &quot;variable access&quot;, 
where &quot;a&quot; is any variable access.</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ident &nbsp;&nbsp;&nbsp;- A variable indentifier.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a[index] - Array access. It is also possible to access any number of</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions by listing multiple indexes separated by &quot;,&quot;:</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[x, y, z, ...]</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a.off &nbsp;&nbsp;&nbsp;- Record access. The &quot;off&quot; will be the element identifier as</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used in the record declaration.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a^ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Pointer reference. The resulting reference will be of the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;variable that the pointer indexes. If the variable reference</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is a file, the result is a reference to the &quot;buffer variable&quot;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for the file.</pre>
<p>Note that a VAR parameter only allows a variable reference, not a full &nbsp;expression. 
For the rest of the expression operators, here they are in precedence, with 
the operators appearing in groups according to priority (highest first). &quot;a&quot; 
and &quot;b&quot; are operands.</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">(a) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- A subexpresion.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">not &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- The boolean &quot;not&quot; of the operand, which must be boolean.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a*b &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Multiplication/set intersection. If the operands are real or</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer, the multiplication is found. If either operand is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real, the result is real. If the operands are sets, the </pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intersection is found, or a new set with elements that exist</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in both sets.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a/b &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Divide. The operands are real or integer. The result is a real</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;representing a divided by b.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a div b &nbsp;- Integer divide. The operands must be integer. The result is an</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer giving a divided by b with no fractional part.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a mod b &nbsp;- Integer modulo. The operands must be integer. The result is an</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer giving the modulo of a divided by b.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a and b &nbsp;- Boolean &quot;and&quot;. Both operands must be boolean. The result is a</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean, giving the &quot;and&quot; of the operands.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">+a &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Identity. The operand is real or integer. The result is the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;same type as the operand, and gives the same sign result as the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;operand (essentially a no-op).</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">-a &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Negation. The operand is real or integer. The result is the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;same type as the operand, and gives the negation of the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;operand.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a+b &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Add/set union. If the operands are real or integer, finds the</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sum of the operands. If either operand is real, the result is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real. If both operands are sets, finds a new set which contains</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the elements of both.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a-b &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Subtract/set difference. If the operands are real or integer,</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finds a minus b. If either operand is real, the result is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real. If both operands are sets, finds a new set which contains</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the elements of a that are not also elements of b.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a or b &nbsp;&nbsp;- Boolean &quot;or&quot;. Both operands must be boolean. The result is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean, giving the boolean &quot;or&quot; of the operands.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a &lt; b &nbsp;&nbsp;&nbsp;- Finds if a is less than b, and returns a boolean result.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The operands can be basic or string types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a &gt; b &nbsp;&nbsp;&nbsp;- Finds if a is greater than b, and returns a boolean result.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The operands can be basic or string types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a &lt;= b &nbsp;&nbsp;- Finds if a is less than or equal to b, and returns a boolean</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result. The operands can be basic, string, set or pointer</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a &gt;= b &nbsp;&nbsp;- Finds if a is greater than or equal to b, and returns a boolean</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result. The operands can be basic, string, set or pointer</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a = b &nbsp;&nbsp;&nbsp;- Finds if a is equal to b, and returns a boolean result.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The operands can be basic, string, set or pointer types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a &lt;&gt; b &nbsp;&nbsp;- Finds if a is not equal to b, and returns a boolean result.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The operands can be basic, string, set or pointer types.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">a in b &nbsp;&nbsp;- Set inclusion. A is an ordinal, b is a set with the same base</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type as a. Returns true if there is an element matching a in</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the set.</pre>
<h2><a name="Predefined functions">Predefined functions</a></h2>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">The following predefined functions exist:</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sqr(x) &nbsp;&nbsp;&nbsp;- Finds the square of x, which can be real or integer. The</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result is the same type as x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sqrt(x) &nbsp;&nbsp;- Finds the square root of x, which can be real or integer. The</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result is always real.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">abs(x) &nbsp;&nbsp;&nbsp;- Finds the absolute value of x, which can be real or integer.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The result is the same type as x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">sin(x) &nbsp;&nbsp;&nbsp;- Finds the sine of x,which can be real or integer. x is</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expressed in radians. The result is always real.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">cos(x) &nbsp;&nbsp;&nbsp;- Finds the cosine of x,which can be real or integer. x is </pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expressed in radians. The result is always real.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">arctan(x) - Finds the arctangent of x, which can be real or integer. The</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result is always real, and is expressed in radians.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">exp(x) &nbsp;&nbsp;&nbsp;- Finds the exponential of x, which can be real or integer. The</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result is always real.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ln(x) &nbsp;&nbsp;&nbsp;&nbsp;- Finds the natural logarithm of x, which can be real or</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer. The result is always real.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">ord(x) &nbsp;&nbsp;&nbsp;- Finds the integer equivalent of any ordinal type x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">succ(x) &nbsp;&nbsp;- Finds the next value of any ordinal type x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">pred(x) &nbsp;&nbsp;- Finds the last value of any ordinal type x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">chr(x) &nbsp;&nbsp;&nbsp;- Finds the char type equivalent of any integer x.</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">trunc(x) &nbsp;- Finds the nearest integer below the given real x (converts a</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">           &nbsp;real to an integer).</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">round(x) &nbsp;- Finds the nearest integer to the given real x.</pre>
<h2><a name="Statements">Statements</a></h2>
<p>Pascal uses &quot;structured statements&quot;. This means you are given a 
few standard control flow methods to build a program with.</p>
<h2><a name="Assignment">Assignment</a></h2>
<p>The fundamental statement is the assignment statement:</p>
<pre>v := x;</pre>
<p>There is a special operator for assignment, &quot;:=&quot; (or &quot;becomes&quot;). 
Only a single variable reference may appear to the right, and any expression 
may appear to the left. The operands must be assignment compatible, as defined 
above.</p>
<h2><a name="If statement">If statement</a></h2>
<p>The if statement is the fundamental flow of control structure:</p>
<pre>if cond then statement [else statement]</pre>
<p>In Pascal, only boolean type expressions may appear for the condition (not 
integers). The if statement specifies a single statement to be executed if the 
condition is true, and an optional statement if the condition is false. You 
must beware of the &quot;bonding problem&quot; if you create multiple nested 
if statements:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">if a = 1 then if b = 2 then writeln('a = 1, b = 2')</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">else writeln('a &lt;&gt; 1');</pre>
<p>Here the else clause is attached to the very last statement that appeared, 
which may not be the one we want.</p>
<h2><a name="While statement">While statement</a></h2>
<p>Just as if is the fundamental flow of control statement, while is the fundamental 
loop statement:</p>
<pre>while cond do statement</pre>
<p>The while statement continually executes it's single statement as long as 
the condition is true. It may not execute the statement at all if the condition 
is never true.</p>
<h2><a name="Repeat statement">Repeat statement</a></h2>
<p>A repeat statement executes a block of statements one or more times:</p>
<pre>repeat statement [; statement] until cond</pre>
<p>It will execute the block of statements as long as the condition is false. 
The statement block will always be executed at least once.</p>
<h2><a name="For statement">For statement</a></h2>
<p>The for statement executes a statement a fixed number of times:</p>
<pre>for i := lower to upper do statement</pre>
<pre>for i := upper downto lower do statement</pre>
<p>The for statement executes the target statement as long as the &quot;control 
variable&quot; lies within the set range of lower..upper. It may not execute 
at all if lower &gt; upper. The control variable in a for is special, and it 
must obey several rules:</p>
<p>1. It must be ordinal.</p>
<p>2. It must be local to the present block (declared in the present block).</p>
<p>3. It must not be &quot;threatened&quot; in the executed statement. To threaten 
means to modify, or give the potential to modify, as in passing as a VAR parameter 
to a procedure or function (see below).</p>
<h2><a name="Case statement">Case statement</a></h2>
<p>The case statement defines an action to be executed on each of the values 
of an ordinal:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">case x of</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;c1: statement;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;c2: statement;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<p>The &quot;selector&quot; is an expression that must result in an ordinal 
type. Each of the &quot;case labels&quot; must be type compatible with the selector. 
The case &nbsp;statement will execute one, and only one, statement that matches 
the current selector value. If the selector matches none of the cases, then 
an error results. It is NOT possible to assume that execution simply continues 
if none of the cases are matched. A case label MUST match the value of the selector.</p>
<h2><a name="Goto statement">Goto statement</a></h2>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">The goto statement directly branches to a given labeled statement:</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">goto 123</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">123:</pre>
<p>Several requirements exist for gotos:</p>
<p>1. The goto label must have been declared in a label declaration.</p>
<p>2. A goto cannot jump into any one of the structured statements above (if, 
while, repeat, for or case statements).</p>
<p>3. If the target of the goto is in another procedure or function, that 
target label must be in the &quot;outer level&quot; of the procedure or function. 
That means that it may not appear inside any structured statement at all.</p>
<h2><a name="Compound statement">Compound statement</a></h2>
<p>A statement block gives the ability to make any number of statements appear 
as one:</p>
<pre>begin statement [; statement]... end</pre>
<p>All of the above statements control only one statement at a time, with the 
exception of repeat. The compound statement allows the inclusion of a whole 
substructure to be controlled by those statements.</p>
<h2><a name="Procedures and functions">Procedures and functions</a></h2>
<p>When you need to use a block of the same statements several times, a compound 
block can be turned into a procedure or function and given a name:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function y: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<p>Then, the block of statements can be called from anywhere:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var i: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">x; { calls the procedure }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">i := y; { calls the function }</pre>
<p>The difference between a procedure and a function is that a function returns 
a result, which can only be a basic or pointer type (not structured). This makes 
it possible to use a function in an expression. In a function, the result is 
returned by a special form of the assign statement:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">function y: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;y := 1 { set function return }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<p>The assignment is special because only the name of the function appears on 
the left hand side of &quot;:=&quot;. It does not matter where the function 
return assignment appears in the function, and it is even possible to have multiple 
assignments to the function, but AT LEAST one such assignment must be executed 
before the function ends. If the procedure or function uses parameters, they 
are declared as:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x(one: integer; two, three: char);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<p>The declaration of a parameter is special in that only a type name may be 
specified, not a full type specification. Once appearing in the procedure or 
function header, parameters can be treated as variables that just happen to 
have been initialized to the value passed to the procedure or function. The 
modification of parameters has no effect on the original parameters themselves. 
Any expression that is assignment compatible with the parameter declaration 
can be used in place of the parameter during it's call:</p>
<pre>x(x*3, 'a', succ('a'));</pre>
<p>If it is desired that the original parameter be modified, then a special 
form of parameter declaration is used:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x(var y: integer);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;y := 1</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<p>Declaring y as a VAR parameter means that y will stand for the original parameter, 
including taking on any values given it:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var q: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;x(q);</pre>
<p>Would change q to have the value 1. In order to be compatible with a VAR 
the passed parameter must be of identical type as the parameter declaration, 
and be a variable reference. Finally, Pascal provides a special mode of parameter 
known as a procedure or function parameter which passes a reference to a given 
procedure or function:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x(procedure y(x, q: integer));</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure z(function y: integer);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<p>To declare a procedure or function parameter, you must give it's full parameter 
list, including a function result if it is a function. A procedure or function 
is passed to a procedure or function by just it's name:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure r(a, b: integer);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;x(r); { pass procedure r to procedure x }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<p>The parameter list for the procedure or function passed must be &quot;congruent&quot; 
with the declared procedure or function parameter declaration. This means that 
all it's parameters, and all of the parameters of it's procedure or function 
parameters, etc., must match the declared parameter. Once the procedure or function 
has been passed, it is then ok for the procedure or function that accepts it 
to use it:</p>
<p>procedure x(procedure y(x, q: integer));</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;y(1, 2);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<p>Would call r with parameters 1 and 2.</p>
<p>Procedures and functions can be declared in advance of the actual appearance 
of the procedure or function block using the forward keyword:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x(a, b: integer); forward;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure y;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;x(1, 2)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">procedure x;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">begin</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;...</pre>
<p>The forward keyword replaces the appearance of the block in the first &nbsp;appearance 
of the declaration. In the second appearance, only the name of the procedure 
appears, not it's header parameters. Then the block appears as normal. The advance 
declaration allows recursive structuring of procedure and function calls that 
would be otherwise not be possible.</p>
<h2><a name="Predefined procedures and file operations">Predefined procedures and file operations</a></h2>
<p>A file is not accessed directly (as an array is). Instead, Pascal automatically 
declares one component of the files base type which is accessed by special syntax:</p>
<pre>f^</pre>
<p>So that:</p>
<pre>f^ := 1;</pre>
<p>Assigns to the file &quot;buffer&quot; component, and:</p>
<pre>v := f^;</pre>
<p>Reads the file buffer. Unless the file is empty or you are at the end of 
the file, the file buffer component will contain the contents of the component 
at the file location you are currently reading or writing. Other than that, 
the file buffer behaves as an ordinary variable, and can even be passed as a 
parameter to routines. The way to actually read or write through a file is by 
using the predeclared procedures:</p>
<pre>get(f);</pre>
<p>Loads the buffer variable with the next element in the file, and advances 
the file position by one element, and:</p>
<pre>put(f);</pre>
<p>Outputs the contents of the buffer variable to the file and advances the 
file position by one. These two procedures are really all you need to implement 
full reading and writing on a file. It also has the advantage of keeping the 
next component in the file as a &quot;lookahead&quot; mechanism. However, it 
is much more common to access files via the predefined procedures read and write:</p>
<pre>read(f, x);</pre>
<p>Is equivalent to:</p>
<pre>x := f^; get(f);</pre>
<p>And:</p>
<pre>write(f, x);</pre>
<p>Is equivalent to:</p>
<pre>f^ := x; put(f);</pre>
<p>Read and write are special in that any number of parameters can appear:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">read(f, x, y, z, ...);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">write(f, x, y, z, ...);</pre>
<p>The parameters to read must be variable references. The parameters to write 
can be expressions of matching type, except for the file parameter (files must 
always be VAR references). Writing to a file is special in that you cannot write 
to a file unless you are at the end of the file. That is, you may only append 
new elements to the end of the file, not modify existing components of the file.</p>
<p>Files are said to exist in three &quot;states&quot;:</p>
<p>1. Inactive.</p>
<p>2. Read.</p>
<p>3. Write.</p>
<p>All files begin life in the inactive state. For a file to be read from, it 
must be placed into the read state. For a file to be written, it must be placed 
in the write state. The reset and rewrite procedures do this:</p>
<pre>reset(f);</pre>
<p>Places the buffer variable at the 1st element of the file (if it exists), 
and sets the file mode to &quot;read&quot;.</p>
<pre>rewrite(f);</pre>
<p>Clears any previous contents of the file, and places the buffer variable 
at the start of the file. The file mode is set to &quot;write&quot;. A file 
can be tested for only one kind of position, that is if it has reached the end:</p>
<pre>eof(f);</pre>
<p>Is a function that returns true if the end of the file has been reached. 
eof must be true before the file can be written.</p>
<h2><a name="Predefined procedures and text files">Predefined procedures and text files</a></h2>
<p>As alluded to before, text files are treated specially under Pascal. First, 
The ends of lines are treated specially. If the end of a line is reached, a 
read call will just return a space. A special function is required to determine 
if the end of the line has been reached:</p>
<pre>eoln(f);</pre>
<p>Returns true if the current file position is at the end of a line. Pascal 
strictly enforces the following structure to text files:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">line 1&lt;eoln&gt;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">line 2&lt;eoln&gt;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">line N&lt;eoln&gt;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&lt;eof&gt;</pre>
<p>There will always be an eoln terminating each line. If the file being read 
does not have an eoln on the last line, it will be added automatically. Besides 
the standard read and write calls, two procedures are special to text files:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">readln(f...);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln(f...);</pre>
<p>Readln behaves as a normal read, but after all the items in the list are 
read, The rest of the line is skipped until eoln is encountered. Writeln behaves 
as a normal write, but after all the items in the list are written, an eoln 
is appended to the output. Text files can be treated as simple files of characters, 
but it is also possible to read and write other types to a text file. Integers 
and reals can be read from a text file, and integers, reals, booleans, 
and strings can be written to text files. These types are written or read from 
the file by converting them to or from a character based format. The format 
for integers on read must be:</p>
<pre>[+/-]digit[digit]...</pre>
<p>Examples:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;9</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">+56</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">-19384</pre>
<p>The format for reals on read is:</p>
<pre>[+/-]digit[digit]...[.digit[digit]...][e[+/-]digit[digit]...]</pre>
<p>Examples:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">-1</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">-356.44</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">7e9</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">+22.343e-22</pre>
<p>All blanks are skipped before reading the number. Since eolns are defined 
as blanks, this means that even eoln is skipped to find the number. This can 
lead to an interesting situation when a number is read from the console. If 
the user presses return without entering a number (on most systems), nothing 
will happen until a number is entered, no matter how many times return is hit!</p>
<p>Write parameters to textfiles are of the format:</p>
<pre>write(x[:field[:fraction]]);</pre>
<p>The field states the number of character positions that you expect the object 
to occupy. The fraction is special to reals. The output format that occurs in 
each case are:</p>
<p>integer: The default field for integers is implementation defined, but is 
usually the number of digits in maxint, plus a position for the sign. If a field 
is specified, and is larger than the number of positions required to output 
the number and sign, then blanks are added to the left side of the output until 
the total size equals the field width. If the field width is less than the required 
positions, the field width is ignored.</p>
<p>real: The default field for reals is implementation defined. There are two 
different format modes depending on whether the fraction parameter appears. 
</p>
<p>If there is no fraction, the format is:</p>
<pre>-0.0000000e+000</pre>
<p>Starting from the left, the sign is either a &quot;-&quot; sign if the number 
is negative, or blank if the number is positive or zero. Then the first digit 
of the number, then the decimal point, then the fraction of the number, then 
either 'e' or 'E' (the case is implementation defined), then the sign of the 
exponent, then the digits of the exponent. The number of digits in the exponent 
are implementation defined, as are the number of digits in a fraction if no 
field width is defined. If the field width appears, and it is larger than the 
total number of required positions in the number (all the characters in the 
above format without the fraction digits), then the fraction is expanded until 
the entire number fills the specified field, using right hand zeros if required. 
Otherwise, the minimum required positions are always printed.</p>
<p>If a fraction appears (which means the field must also appear), the format 
used is:</p>
<pre>[-]00...00.000..00</pre>
<p>The number is converted to it's whole number equivalent, and all the of whole 
number portion of the number printed, regardless of the field size, proceeded 
by &quot;-&quot; if the number is negative. Then, a decimal point appears, followed 
by the number of fractional digits specified in the fraction parameter. If the 
field is greater then the number of required positions and specified fraction 
digits, then leading spaces are appended until the total size equals the field 
width. The minimum positions and the specified fractional digits are always 
printed.</p>
<h2><a name="Header files">Header files</a></h2>
<p>The header files feature was originally designed to be the interface of Pascal 
to the external files system, and as such is implementation by definition. It 
is also (unfortunately) ignored in most implementations. The header files appear 
as a simple list of identifiers in the program header:</p>
<p>program test(input, output, source, object);</p>
<p>Each header file automatically assumes the type text. If the file needs to 
be another type, it should be declared again in the variables section of the 
program block:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">program test(intlist);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var intlist: file of integer;</pre>
<p>Two files are special, and should not be redeclared. These are input and 
output. The input files are understood to represent the main input and main 
output from the program, and are present in all Pascal programs. In addition, 
they are the default files is special forms of these &nbsp;procedures and functions:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">This form &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is equivalent to &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This form</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">--------------------------------------------------------------</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">write(...) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write(output, ...)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln(...) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writeln(output, ...)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">writeln &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writeln(output)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">read(...) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read(input, ...)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">readln(...) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readln(input, ...)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">readln &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readln(input)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">eof &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eof(input)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">eoln &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eoln(input)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">page                                 page(output)</pre>
<h2><a name="Packing procedures">Packing procedures</a></h2>
<p>Because arrays are incompatible with each other even when they are of the 
same type if their packing status differs, two procedures allow a packed array 
to be copied to a non-packed array and vice versa:</p>
<pre>unpack(PackedArray, UnpackedArray, Index);</pre>
<p>Unpacks the packed array and places the contents into the unpacked array. 
The index gives the starting index of the unpacked array where the data is to 
be placed. Interestingly, the two arrays need not have the same index type or 
even be the same size ! The unpacked array must simply have enough elements 
after the specified starting index to hold the number of elements in the packed 
array.</p>
<pre>pack(UnpackedArray, Index, PackedArray);</pre>
<p>Packs part of the unpacked array into the packed array. The index again gives 
the starting position to copy data from in the unpacked array. Again, the arrays 
need not be of the same index type or size. The unpacked array simply need enough 
elements after the index to provide all the values in the packed array.</p>
<h2><a name="Dynamic allocation">Dynamic allocation</a></h2>
<p>In Pascal, pointer variables are limited to the mode of variable they can 
index. The objects indexed by pointer types are anonymous, and created or destroyed 
by the programmer at will. A pointer variable is undefined when it is first 
used, and it is an error to access the variable it points to unless that variable 
has been created:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var p: ^integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;new(p); { create a new integer type }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;p^ := 1; { place value }</pre>
<p>Would create a new variable. Variables can also be destroyed:</p>
<pre>dispose(p);</pre>
<p>Would release the storage allocated to the variable. It is an error (a very 
serious one) to access the contents of a variable that has been disposed. A 
special syntax exists for the allocation of variant records:</p>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">var r: record</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a: integer;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case b: boolean 
of</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true: 
(c: integer);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false: 
(d: char)</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ end }</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">new(p, true);</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">...</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">&nbsp;</pre>
<pre style="line-height:100%; margin-top:0; margin-bottom:0;">dispose(p, true);</pre>
<p>For each of new and dispose, each of the tagfields we want to discriminate 
are parameters to the procedure. The appearance of the tagfield values allow 
the compiler to allocate a variable with only the amount of space required for 
the record with that variant. This can allow considerable storage savings if 
used correctly. The appearance of a discriminant in a new procedure does not 
also &nbsp;automatically SET the value of the tagfield. You must do that yourself. 
For the entire life of the variable, you must not set the tagfield to any other 
value than the value used in the new procedure, nor access any of the &nbsp;variants 
in the record that are not active. The dispose statement should be called with 
the exact same tagfield values and number. Note that ALL the tagfields in a 
variable need not appear, just all the ones, in order, that we wish to allocate 
as fixed.</p>
<center>
<hr WIDTH="100%"></center>

<address>
For more information contact: <a href="mailto:samiam@moorecad.com">Scott A. Moore samiam@moorecad.com</a></address>

</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted mac_flip_script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#
# Convert file line endings
#
# This is a script version of "flip" for systems where this utility
# is not available.
#
# The format of the call is:
#
# flip [-u|-m] <file>
#
# Where:
#
#    -u    Means to change line endings to Unix style
#    -m    Means to change line endings to DOS style
#    file  Is the file to convert
#

if [ -z "$1" ]
then
   echo "*** Error: Missing parameter 1"
   exit 1
fi

if [ -z "$2" ]
then
   echo "*** Error: Missing parameter 2"
   exit 1
fi

if [ $1 = "-u" ]
then

   ueoln < $2 > tmp
   mv tmp $2

elif [ $1 = "-m" ]
then

   deoln < $2 > tmp
   mv tmp $2

else

   echo "*** No ending type specified"

fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































Deleted make_flip.

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
#
# Fix line ending on bash scripts
#
echo
echo Compiling and creating flip script
echo
gcc -o deoln deoln.c
gcc -o ueoln ueoln.c
cp mac_flip_script flip
chmod +x flip
<
<
<
<
<
<
<
<
<
<
<






















Deleted news.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
************************** WHATS NEW IN THIS VERSION ***************************

Welcome to version 1.0

- P5 now passes the BSI compliance test.

- All of the remaining BSI discovered issues were matched with an equivalent
  test in iso7185pat.

- Several bugs, some serious, were solved with the system.

- Reals, which were always passed in string form, now use variable length
  strings to store them. This should result in greatly reduced storage 
  requirements in pcom.

- The script files for Windows compiles were improved considerably. Now they no
  longer just continue after an error.

********************************************************************************
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Changes to p2/roman.cmp.

1
2
3
4
5
6
7
8
P5 Pascal interpreter vs. 1.2.x

Assembling/loading program
Running program


         1 I
         2 II
|







1
2
3
4
5
6
7
8
P5 Pascal interpreter vs. 1.2

Assembling/loading program
Running program


         1 I
         2 II

Changes to p4/standardp.cmp.

1
2
3
4
5
6
7
8
P5 Pascal interpreter vs. 1.2.x

Assembling/loading program
Running program


*******************************************************************************

|







1
2
3
4
5
6
7
8
P5 Pascal interpreter vs. 1.2

Assembling/loading program
Running program


*******************************************************************************

Deleted p5.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Compile with P5 using IP Pascal
#
# Execute with:
#
# p5 <file>
#
# Where <file> is the name of the source file without
# extention. The Pascal file is compiled and run.
# Any compiler errors are output to the screen. Input
# and output to and from the running program are from
# the console, but output to the prr file is placed
# in <file>.out.
# The intermediate code is placed in <file>.p5.
#

if [ -z "$1" ]
then

   echo "*** Error: Missing parameter"
   exit 1

fi

if [ ! -f $1.pas ]
then

   echo "*** Error: Missing $1.pas file"
   exit 1

fi

echo
echo Compiling and running $1
echo
./pcom $1.p5 < $1.pas
./pint $1.p5 $1.out
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted p5.bat.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
rem
rem Compile with P5 using IP Pascal
rem
rem Execute with:
rem
rem p5 <file>
rem
rem where <file> is the name of the source file without
rem extention. The Pascal file is compiled and run.
rem Any compiler errors are output to the screen. Input
rem and output to and from the running program are from
rem the console, but output to the prr file is placed
rem in <file>.out.
rem The intermediate code is placed in <file>.p5.
rem

if not "%1"=="" goto paramok
echo *** Error: Missing parameter
goto stop
:paramok

if exist "%1.pas" goto fileexists
echo *** Error: Missing %1.pas file
goto stop
:fileexists

echo.
echo Compiling and running %1
echo.
pcom %1.p5 < %1.pas
pint %1.p5 %1.out
rem
rem Terminate
rem
:stop
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Changes to p5c/Makefile.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pcom: source/pcom.pas
	# disable variant checking for now
	sed 's/(\*$$c+,t-,d-/(*$$c+,t-,d-,v-/' \
		      < source/pcom.pas \
		      > source/pcom_nov.pas
	$$P5CDIR/p5c source/pcom_nov.pas source/pcom.c > source/pcom.lst
	gcc -I $$P5CDIR -o bin/pcom -lm source/pcom.c 2> source/pcom.err
	[ -s source/pcom.err ] || rm -f source/pcom.{c,err}

pint: source/pint.pas
	$$P5CDIR/p5c  source/pint.pas source/pint.c > source/pint.lst
	gcc -I $$P5CDIR -O3 -o bin/pint -lm source/pint.c 2> source/pint.err
	[ -s source/pint.err ] || rm -f source/pint.{c,err}


clean:
	rm -f bin/pcom bin/pint 
	find . -name "*.p5" -type f -delete
	find . -name "*.out" -type f -delete
	find . -name "*.lst" -type f -delete







|




|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pcom: source/pcom.pas
	# disable variant checking for now
	sed 's/(\*$$c+,t-,d-/(*$$c+,t-,d-,v-/' \
		      < source/pcom.pas \
		      > source/pcom_nov.pas
	$$P5CDIR/p5c source/pcom_nov.pas source/pcom.c > source/pcom.lst
	gcc -I $$P5CDIR -o bin/pcom -lm source/pcom.c 2> source/pcom.err
	@[ -s source/pcom.err ] || rm -f source/pcom.{c,err}

pint: source/pint.pas
	$$P5CDIR/p5c  source/pint.pas source/pint.c > source/pint.lst
	gcc -I $$P5CDIR -O3 -o bin/pint -lm source/pint.c 2> source/pint.err
	@[ -s source/pint.err ] || rm -f source/pint.{c,err}


clean:
	rm -f bin/pcom bin/pint 
	find . -name "*.p5" -type f -delete
	find . -name "*.out" -type f -delete
	find . -name "*.lst" -type f -delete

Changes to p5c/compile.

35
36
37
38
39
40
41
42
43
44
45


46
47
48

rm -f $1.p5
pcom  $1.pas $1.p5 > $1.err
#
# The status of the compile is not returned, so convert a non-zero
# error message to fail status
#
grep -q "Errors in program: 0" $1.err
rc=$?
if [[ $rc != 0 ]] ; then



    exit 1
        
fi







<
<
<

>
>
|
<

35
36
37
38
39
40
41



42
43
44
45

46

rm -f $1.p5
pcom  $1.pas $1.p5 > $1.err
#
# The status of the compile is not returned, so convert a non-zero
# error message to fail status
#




if ! grep -q "Errors in program: 0" $1.err ; then
    grep "Errors in program:" $1.err
    exit 1       

fi

Deleted pcom.

cannot compute difference between binary files

Deleted pcom.exe.

cannot compute difference between binary files

Deleted pcom.pas.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
(*$c+,t-,d-,l-*)
{*******************************************************************************
*                                                                              *
*                     Portable Pascal assembler/interpreter                    *
*                     *************************************                    *
*                                                                              *
*                                 Pascal P5                                    *
*                                                                              *
*                                 ETH May 76                                   *
*                                                                              *
* Authors:                                                                     *
*    Urs Ammann                                                                *
*    Kesav Nori                                                                *
*    Christian Jacobi                                                          *
*    K. Jensen                                                                 *
*    N. Wirth                                                                  *
*                                                                              *
*    Address:                                                                  *
*       Institut Fuer Informatik                                               *
*       Eidg. Technische Hochschule                                            *
*       CH-8096 Zuerich                                                        *
*                                                                              *
*  This code is fully documented in the book                                   *
*        "Pascal Implementation"                                               *
*   by Steven Pemberton and Martin Daniels                                     *
* published by Ellis Horwood, Chichester, UK                                   *
*         ISBN: 0-13-653-0311                                                  *
*       (also available in Japanese)                                           *
*                                                                              *
* Steven Pemberton, CWI/AA,                                                    *
* Kruislaan 413, 1098 SJ Amsterdam, NL                                         *
* Steven.Pemberton@cwi.nl                                                      *
*                                                                              *
* Adaption from P4 to P5 by:                                                   *
*                                                                              *
*    Scott A. Moore                                                            *
*    samiam@moorecad.com                                                       *
*                                                                              *
*    The comments marked with brackets are mine [sam]                          *
*                                                                              *
* P5 is an extended version of P4 with the following goals:                    *
*                                                                              *
* 1. The remaining unimplemented functions of Pascal are implemented, so that  *
*    P5 is no longer a "subset" of full Pascal. This was done because it is    *
*    no longer necessary to produce a minimum size implementation, and it      *
*    allows any standard program to be used with P5.                           *
*                                                                              *
* 2. The P5 compiler is brought up to ISO 7185 level 0 standards, both in the  *
*    language it compiles for, and the language it is implemented in.          *
*                                                                              *
* 3. The internal storage efficiency is increased. For example, character      *
*    strings no longer take as much space per character as integers and other  *
*    data. Sets are placed in their own space so that the minimum stack size   *
*    not determined by set size.                                               *
*                                                                              *
* 4. The remaining limitations and dependencies on the CDC 6000 version are    *
*    removed. For example, the instruction store no longer is packed 2         *
*    instructions to a 60 bit word.                                            *
*                                                                              *
* 5. General clean up. Longstanding bugs and issues are addressed. Constants   *
*    that were buried in the source (magic numbers) were made constants. The   *
*    type 'alpha' (specific to CDC 6000) was replaced with idstr, etc.         *
*                                                                              *
* The idea of P5 is to obtain a compiler that is ISO 7185 compliant, can       *
* compile itself, can compile any reasonable standard program, and is          *
* efficient enough to be used as a normal compiler for some certain uses.      *
* Finally, it can serve as a starting implementation for native compilers.     *
*                                                                              *
* P5 machine instructions added:                                               *
*                                                                              *
* rnd    round:   expects a float on stack, performs round() and places the    *
*                 result back on the stack as an integer.                      *
*                                                                              *
* pck ln pack:    Expects a packed array on stack top, followed by the         *
*                 starting subscript, then the unpacked array. The parameter   *
*                 contains the length of packed array in elements. Performs    *
*                 pack(upa, ss, pa) and removes all from stack. The starting   *
*                 subscript is zero based and scaled to the element size.      *
*                                                                              *
* upk ln pack:    Expects the starting subscript on stack top, followed by the *
*                 unpacked array, then the packed array. The parameter         *
*                 contains the length of packed array in elements. Performs    *
*                 unpack(pa, upa, ss) and removes all from stack. The starting *
*                 subscript is zero based and scaled to the element size.      *
*                                                                              *
* rgs    set rng: Expects a set range specification on stack, with the last    *
*                 value on the top, and the first value next. The two values   *
*                 are replaced with a set with all of the values between and   *
*                 including the first and last values.                         *
*                                                                              *
* fbv ad buf val: Validates a file buffer variable. Expects a file address on  *
*                 stack. The buffer is "validated" for lazy I/O, which means   *
*                 that if the associated file is in read mode, the delayed     *
*                 read to the buffer variable occurs. The file address remains *
*                 on the stack.                                                *
*                                                                              *
* ipj v l ip jmp: Interprocedure jump. Contains the level of the target        *
*                 procedure, and the label to jump to. The stack is adjusted   *
*                 to remove all nested procedures/functions, then the label is *
*                 unconditionally jumped to.                                   *        
*                                                                              *
* cip p           Call indirect procedure/function. The top of stack has the   *
*                 address of a mp/address pair pushed by lpa. The dl of the    *
*                 current mark is replaced by the mp, and the address replaces *
*                 the current pc. The mp/ad address is removed from stack.     *
*                                                                              *
* lpa p l q       Load procedure address. The current mark pointer is loaded   *
*                 onto the stack, followed by the target procedure or function *
*                 address. This puts enough information on the stack to call   *
*                 it with the callers environment.                             *
*                                                                              *
* lip p q         load procedure function address. Loads a mark/address pair   *
*                 for a procedure or function parameter onto the stack. Used   *
*                 to pass a procedure or function parameter to another         *
*                 procedure or function.                                       *
*                                                                              *
* efb    eof:     Find eof for binary file. The top of stack is a logical file *
*                 number. The eof boolean vale replaces it.                    *
*                                                                              *
* fvb ad buf val: Expects the length of the file buffer on stack, and the file *
*                 address under that. The buffer is "validated" for lazy I/O,  *
*                 which means that if the associated file is in read mode, the *
*                 delayed read to the buffer variable occurs. The buffer       *
*                 length is removed only.                                      *
*                                                                              *
* dmp q           Subtracts the value from the stack top. Used to dump the top *
*                 of the stack.                                                *
*                                                                              *
* swp q           Pulls the second on stack to the top, swapping the top to    *
*                 elements. The size of the second on stack is specified, but  *
*                 the top of the on stack is implied as a pointer.             *
*                                                                              *
* tjp q           Expects a boolean on stack. Jumps to the address if the      *
*                 value is true. Removes the value from the stack.             *
*                                                                              *
* P5 machine built in procedures/functions added:                              *
*                                                                              *
* pag    page:    Expects a logical file number on stack top. Performs page(). *
*                                                                              *
* rsf    reset:   Expects a logical file number on stack top. Performs         *
*                 reset() and sets the file to text mode.                      *
*                                                                              *
* rwf    rewrite: Expects a logical file number on stack top. Performs         *
*                 reset() and sets the file to text mode.                      *
*                                                                              *
* wrb    write:   Expects a field number on stack top, followed by a boolean   *
*                 to print, then the logical file number. The boolean is       *
*                 output as per ISO 7185.                                      *
*                                                                              *
* rgs    set rng: Expects a set range specification on stack, with the last    *
*                 value on the top, and the first value next. The two values   *
*                 are replaced with a set with all of the values between and   *
*                 including the first and last values.                         *
*                                                                              *
* wrf    write:   Expects a logical file number on stack top, followed by a    *
*                 field number, then a fraction, then a real to print. The     *
*                 real is output in r:f:f (fraction) format. All but the file  *
*                 are removed from stack.                                      *
*                                                                              *
* wbf    write:   Expects a file address on stack top, followed by the length  *
*                 of the type to write, then the variable address to write     *
*                 from. Writes binary store to the file.                       *
*                                                                              *
* wbi    write:   Expects a file address on stack top, followed by an integer. *
*                 Writes the integer to the file in binary format.             *
*                                                                              *
* wbr    write:   Expects a file address on stack top, followed by a real.     *
*                 Writes the real to the file in binary format.                *
*                                                                              *
* wbc    write:   Expects a file address on stack top, followed by a           *
*                 character. Writes the character to the file in binary        *
*                 format.                                                      *
*                                                                              *
* wbb    write:   Expects a file address on stack top, followed by a boolean.  *
*                 Writes the boolean to the file in binary format.             *
*                                                                              *
* rbf    read:    Expects a file address on stack top, followed by the length  *
*                 of the type to read, then the variable address to read       *
*                 from. Reads binary store from the file.                      *
*                                                                              *
* rsb    reset:   Expects a logical file number on stack top. Performs         *
*                 reset() and sets the file to binary mode.                    *
*                                                                              *
* rwb    rewrite: Expects a logical file number on stack top. Performs         *
*                 reset() and sets the file to binary mode.                    *
*                                                                              *
* gbf    get:     Get file binary. Expects the length of a file element on     *
*                 stack top, followed by a pointer to the file. The next file  *
*                 element is loaded to the file buffer.                        *
*                                                                              *
* pbf    put:     Put file binary. Expects the length of a file element on     *
*                 stack top, followed by a pointer to the file. Writes the     *
*                 file buffer to thr file.                                     *
*                                                                              *
* Note that the previous version of P4 added some type specified instructions  *
* that used to be unified, typeless instructions.                              *
*                                                                              *
* P5 errors added:                                                             *
*                                                                              *
* 182 identifier too long                                                      *
* 183 For index variable must be local to this block                           *
* 184 Interprocedure goto does not reference outter block of destination       *
* 185 Goto references deeper nested statement                                  *
* 186 Label referenced by goto at lesser statement level                       *
* 187 Goto references label in different nested statement                      *
* 188 Label referenced by goto in different nested statement                   *
* 189 Parameter lists of formal and actual parameters not congruous.           *
*                                                                              *
* P5 instructions modified:                                                    *
*                                                                              *
* lca'string'       '                                                          *
*                                                                              *
* was changed to                                                               *
*                                                                              *
* lca 'string'''                                                               *
*                                                                              *
* That is, lca has a space before the opening quote, no longer pads to the     *
* right, and represents single quotes with a quote image. pint converts quote  *
* images back to single quotes, and pads out strings to their full length.     *
*                                                                              *
* In addition, the way files work was extensively modified. Original P5 could  *
* not represent files as full1y expressed variables, such as within an array   *
* or record, and were effectively treated as constants. To treat them as true  *
* variable accesses, the stacking order of the file in all file subroutines    *
* was changed so that the file is on the bottom. This matches the source       *
* order of the file in write(f, ...) or read(f, ...). Also, the file           *
* operations now leave the file on the stack for the duration of a write or    *
* read, then dump them using a specific new instruction "dmp". This allows     *
* multiparameter writes and reads to be effectively a chain of single          *
* operations using one file reference. Finally, files were tied to the type    *
* ending 'a', because files are now full variable references.                  *
*                                                                              *
*******************************************************************************}

program pascalcompiler(input,output,prr);

label 99; { terminate immediately }

const 

   {

   Program object sizes and characteristics, sync with pint. These define
   the machine specific characteristics of the target. 
   
   This configuration is for a 32 bit machine as follows:

   integer               32  bits
   real                  64  bits
   char                  8   bits
   boolean               8   bits
   set                   256 bits
   pointers              32  bits
   marks                 32  bits
   File logical number   8   bits

   Both endian types are supported. There is no alignment needed, but you
   may wish to use alignment to tune the runtime speed.

   The machine characteristics dependent on byte accessable machines. This
   table is all you should need to adapt to any byte addressable machine.

   }

   intsize     =        4;  { size of integer }
   intal       =        4;  { memory alignment of integer }
   realsize    =        8;  { size of real }
   realal      =        4;  { memory alignment of real }
   charsize    =        1;  { size of char }
   charal      =        1;  { memory alignment of char }
   charmax     =        1;
   boolsize    =        1;  { size of boolean }
   boolal      =        1;  { alignment of boolean }
   ptrsize     =        4;  { size of pointer }
   adrsize     =        4;  { size of address }
   adral       =        4;  { alignment of address }
   setsize     =       32;  { size of set }
   setal       =        1;  { alignment of set }
   filesize    =        1;  { required runtime space for file (lfn) }
   fileidsize  =        1;  { size of the lfn only }
   stackal     =        4;  { alignment of stack }
   stackelsize =        4;  { stack element size }
   maxsize     =       32;  { this is the largest type that can be on the stack }
   heapal      =        4;  { alignment for each heap arena }
   sethigh     =      255;  { Sets are 256 values }
   setlow      =        0;
   ordmaxchar  =      255;  { Characters are 8 bit ISO/IEC 8859-1 }
   ordminchar  =        0;
   maxresult   = realsize;  { maximum size of function result }
   marksize    =       32;  { maxresult+6*ptrsize }
   { Value of nil is 1 because this allows checks for pointers that were
     initialized, which would be zero (since we clear all space to zero).
     In the new unified code/data space scheme, 0 and 1 are always invalid
     addresses, since the startup code is at least that long. }
   nilval      =        1;  { value of 'nil' }

   { end of pcom and pint common parameters }

   displimit   = 300;
   maxlevel    = 255;
   { strglgth used to define the size of all strings in pcom and pint. With the
     string quanta system, string lengths are effectively unlimited, but there
     it still sets the size of some buffers in pcom. }
   strglgth    = 250;
   { maximum number of digits in real, including sign and exponent }
   digmax      = 250;
   { lcaftermarkstack is a very pcom specific way of stating the size of a mark
     in pint. However, it is used frequently in Perberton's documentation, so I
     left it, but equated it to the more portable marksize. }
   lcaftermarkstack = marksize;
   fileal      = charal;
   (* stackelsize = minimum size for 1 stackelement
                  = k*stackal
      stackal     = scm(all other al-constants)
      charmax     = scm(charsize,charal)
                    scm = smallest common multiple
      lcaftermarkstack >= maxresult+3*ptrsize+max(x-size)
                        = k1*stackelsize          *)
   maxstack   =       1;
   parmal     = stackal;
   parmsize   = stackelsize;
   recal      = stackal;
   filebuffer =       4; { number of system defined files }
   maxaddr    =  maxint;
   maxsp      = 39;  { number of standard procedures/functions }
   maxins     = 74;  { maximum number of instructions }
   maxids     = 250; { maximum characters in id string (basically, a full line) }
   maxstd     = 39;  { number of standard identifiers }
   maxres     = 35;  { number of reserved words }
   reslen     = 9;   { maximum length of reserved words }
   varsqt     = 10;  { variable string quanta }
   prtlln     = 10;  { number of label characters to print in dumps }

   { default field sizes for write }
   intdeff    = 11; { default field length for integer }
   reldeff    = 22; { default field length for real }
   chrdeff    = 1;  { default field length for char (usually 1) }
   boldeff    = 5;  { default field length for boolean (usually 5 for 'false' }

   { debug flags }

   dodmplex   = false; { dump lexical }
   doprtryc   = false; { dump recycling tracker counts }

   { version numbers }

   majorver   = 1; { major version number }
   minorver   = 0; { minor version number }

type                                                        (*describing:*)
                                                            (*************)

     {marktype= ^integer;}
                                                            (*basic symbols*)
                                                            (***************)

     symbol = (ident,intconst,realconst,stringconst,notsy,mulop,addop,relop,
               lparent,rparent,lbrack,rbrack,comma,semicolon,period,arrow,
               colon,becomes,range,labelsy,constsy,typesy,varsy,funcsy,progsy,
               procsy,setsy,packedsy,arraysy,recordsy,filesy,beginsy,ifsy,
               casesy,repeatsy,whilesy,forsy,withsy,gotosy,endsy,elsesy,untilsy,
               ofsy,dosy,tosy,downtosy,thensy,nilsy,othersy);
     operator = (mul,rdiv,andop,idiv,imod,plus,minus,orop,ltop,leop,geop,gtop,
                 neop,eqop,inop,noop);
     setofsys = set of symbol;
     chtp = (letter,number,special,illegal,
             chstrquo,chcolon,chperiod,chlt,chgt,chlparen,chspace,chlcmt);
     { Here is the variable length string containment to save on space. strings
       strings are only stored in their length rounded to the nearest 10th. }
     strvsp = ^strvs; { pointer to variable length id string }
     strvs = record { id string variable length }
                 str:   packed array [1..varsqt] of char; { data contained }
                 next:  strvsp { next }
               end;

                                                            (*constants*)
                                                            (***********)
     setty = set of setlow..sethigh;
     cstclass = (reel,pset,strg);
     csp = ^ constant;
     constant = record
                       next: csp; { next entry link }
                       case cclass: cstclass of
                         reel: (rval: strvsp);
                         pset: (pval: setty);
                         strg: (slgth: 0..strglgth; sval: strvsp)
                       end;

     valu = record case intval: boolean of  (*intval never set nor tested*)
                     true:  (ival: integer);
                     false: (valp: csp)
                   end;

                                                           (*data structures*)
                                                           (*****************)
     levrange = 0..maxlevel; addrrange = 0..maxaddr;
     structform = (scalar,subrange,pointer,power,arrays,records,files,
                   tagfld,variant);
     declkind = (standard,declared);
     stp = ^ structure; 
     ctp = ^ identifier;

     structure = record
                   next: stp; { next entry link }
                   marked: boolean;   (*for test phase only*)
                   size: addrrange;
                   packing: boolean; { packing status }
                   case form: structform of
                     scalar:   (case scalkind: declkind of
                                  declared: (fconst: ctp); standard: ());
                     subrange: (rangetype: stp; min,max: valu);
                     pointer:  (eltype: stp);
                     power:    (elset: stp; matchpack: boolean);
                     arrays:   (aeltype,inxtype: stp);
                     records:  (fstfld: ctp; recvar: stp; recyc: stp);
                     files:    (filtype: stp);
                     tagfld:   (tagfieldp: ctp; fstvar: stp);
                     variant:  (nxtvar,subvar: stp; varval: valu)
                   end;

                                                            (*names*)
                                                            (*******)

     idclass = (types,konst,vars,field,proc,func);
     setofids = set of idclass;
     idkind = (actual,formal);
     idstr = packed array [1..maxids] of char;
     restr = packed array [1..reslen] of char;
     nmstr = packed array [1..digmax] of char;
     csstr = packed array [1..strglgth] of char;
     identifier = record
                   name: strvsp; llink, rlink: ctp;
                   idtype: stp; next: ctp; keep: boolean;
                   case klass: idclass of
                     types: ();
                     konst: (values: valu);
                     vars:  (vkind: idkind; vlev: levrange; vaddr: addrrange);
                     field: (fldaddr: addrrange);
                     proc, func:  (pfaddr: addrrange; pflist: ctp; { param list }
                                   case pfdeckind: declkind of
                              standard: (key: 1..18);
                              declared: (pflev: levrange; pfname: integer;
                                          case pfkind: idkind of
                                           actual: (forwdecl, externl: boolean);
                                           formal: ()))
                   end;


     disprange = 0..displimit;
     where = (blck,crec,vrec,rec);

                                                            (*expressions*)
                                                            (*************)
     attrkind = (cst,varbl,expr);
     vaccess = (drct,indrct,inxd);

     attr = record typtr: stp;
              case kind: attrkind of
                cst:   (cval: valu);
                varbl: (case access: vaccess of
                          drct: (vlevel: levrange; dplmt: addrrange);
                          indrct: (idplmt: addrrange);
           inxd: ());
      expr: ()
              end;

                                                                 (*labels*)
                                                                 (********)
     lbp = ^ labl;
     labl = record { 'goto' label }
                   nextlab: lbp;      { next list link }
                   defined: boolean;  { label defining point was seen }
                   labval,            { numeric value of label }
                   labname: integer;  { internal sequental name of label }
                   vlevel: levrange;  { procedure level of definition }
                   slevel:  integer;  { statement level of definition }
                   ipcref:  boolean;  { was referenced by another proc/func }
                   minlvl:  integer;  { minimum goto reference statement lvl }
                   bact:    boolean;  { containing block is active }
            end;

     { external file tracking entries }
     extfilep = ^filerec;
     filerec = record filename:idstr; nextfile:extfilep end;

     { case statement tracking entries }
     cip = ^caseinfo;
     caseinfo = record next: cip;
                  csstart: integer;
                  cslab: integer
                end;

(*-------------------------------------------------------------------------*)

var

    { !!! remove this statement for self compile }    
    {elide}prr: text;{noelide}       { output code file }

                                    (*returned by source program scanner
                                     insymbol:
                                     **********)

    sy: symbol;                     (*last symbol*)
    op: operator;                   (*classification of last symbol*)
    val: valu;                      (*value of last constant*)
    lgth: integer;                  (*length of last string constant*)
    id: idstr;                      (*last identifier (possibly truncated)*)
    kk: 1..maxids;                  (*nr of chars in last identifier*)
    ch: char;                       (*last character*)
    eol: boolean;                   (*end of line flag*)


                                    (*counters:*)
                                    (***********)

    chcnt: integer;                 (*character counter*)
    lc,ic: addrrange;               (*data location and instruction counter*)
    linecount: integer;


                                    (*switches:*)
                                    (***********)

    dp,                             (*declaration part*)
    list,prcode,prtables: boolean;  (*output options for
                                        -- source program listing
                                        -- printing symbolic code
                                        -- displaying ident and struct tables
                                        --> procedure option*)
    debug: boolean;


                                    (*pointers:*)
                                    (***********)
    parmptr,
    intptr,realptr,charptr,
    boolptr,nilptr,textptr: stp;    (*pointers to entries of standard ids*)
    utypptr,ucstptr,uvarptr,
    ufldptr,uprcptr,ufctptr,        (*pointers to entries for undeclared ids*)
    fwptr: ctp;                     (*head of chain of forw decl type ids*)
    outputptr,inputptr: ctp;        { pointers to default files }
    fextfilep: extfilep;            (*head of chain of external files*)

                                    (*bookkeeping of declaration levels:*)
                                    (************************************)

    level: levrange;                (*current static level*)
    disx,                           (*level of last id searched by searchid*)
    top: disprange;                 (*top of display*)

    display:                        (*where:   means:*)
      array [disprange] of
        packed record               (*=blck:   id is variable id*)
          fname: ctp; flabel: lbp;  (*=crec:   id is field id in record with*)
          fconst: csp; fstruct: stp;
          case occur: where of      (*   constant address*)
            crec: (clev: levrange;  (*=vrec:   id is field id in record with*)
                  cdspl: addrrange);(*   variable address*)
            vrec: (vdspl: addrrange);
            blck: (bname: ctp);     { block id }
            rec: ()
        end;                        (* --> procedure withstatement*)


                                    (*error messages:*)
                                    (*****************)

    errinx: 0..10;                  (*nr of errors in current source line*)
    errlist:
      array [1..10] of
        packed record pos: integer;
                      nmr: 1..500
               end;



                                    (*expression compilation:*)
                                    (*************************)

    gattr: attr;                    (*describes the expr currently compiled*)


                                    (*structured constants:*)
                                    (***********************)

    constbegsys,simptypebegsys,typebegsys,blockbegsys,selectsys,facbegsys,
    statbegsys,typedels: setofsys;
    chartp : array[char] of chtp;
    rw:  array [1..maxres(*nr. of res. words*)] of restr;
    frw: array [1..10] of 1..36(*nr. of res. words + 1*);
    rsy: array [1..maxres(*nr. of res. words*)] of symbol;
    ssy: array [char] of symbol;
    rop: array [1..maxres(*nr. of res. words*)] of operator;
    sop: array [char] of operator;
    na:  array [1..maxstd] of restr;
    mn:  array [0..maxins] of packed array [1..4] of char;
    sna: array [1..maxsp] of packed array [1..4] of char;
    cdx: array [0..maxins] of -4..+4;
    pdx: array [1..maxsp] of -7..+7;
    ordint: array [char] of integer;

    intlabel,mxint10: integer;
    inputhdf: boolean; { 'input' appears in header files }
    outputhdf: boolean; { 'output' appears in header files }
    errtbl: array [1..500] of boolean; { error occrence tracking }
    toterr: integer; { total errors in program }

    { Recycling tracking counters, used to check for new/dispose mismatches. }
    strcnt: integer; { strings }
    cspcnt: integer; { constants }
    stpcnt: integer; { structures }
    ctpcnt: integer; { identifiers }
    lbpcnt: integer; { label counts }
    filcnt: integer; { file tracking counts }
    cipcnt: integer; { case entry tracking counts }

    f: boolean; { flag for if error number list entries were printed }
    i: 1..500; { index for error number tracking array }
(*-------------------------------------------------------------------------*)

                           { recycling controls }

(*-------------------------------------------------------------------------*)

  { get string quanta }
  procedure getstr(var p: strvsp);
  begin
     new(p); { get new entry }
     strcnt := strcnt+1 { count }
  end;

  { recycle string quanta list }
  procedure putstrs(p: strvsp);
  var p1: strvsp;
  begin
    while p <> nil do begin
      p1 := p; p := p^.next; dispose(p1); strcnt := strcnt-1
    end
  end;

  { get label entry }
  procedure getlab(var p: lbp);
  begin
     new(p); { get new entry }
     lbpcnt := lbpcnt+1 { add to count }
  end;

  { recycle label entry }
  procedure putlab(p: lbp);
  begin
     dispose(p); { release entry }
     lbpcnt := lbpcnt-1 { remove from count }
  end;

  { push constant entry to list }
  procedure pshcst(p: csp);
  begin
     { push to constant list }
     p^.next := display[top].fconst;
     display[top].fconst := p;
     cspcnt := cspcnt+1 { count entries }
  end;

  { recycle constant entry }
  procedure putcst(p: csp);
  begin
     { recycle string if present }
     if p^.cclass = strg then putstrs(p^.sval)
     else if p^.cclass = reel then putstrs(p^.rval);
     dispose(p); { release entry }
     cspcnt := cspcnt-1 { remove from count }
  end;

  { push structure entry to list }
  procedure pshstc(p: stp);
  begin
     { push to structures list }
     p^.next := display[top].fstruct;
     display[top].fstruct := p;
     stpcnt := stpcnt+1 { count entries }
  end;

  { recycle structure entry }
  procedure putstc(p: stp);
  begin
     dispose(p); { release entry }
     stpcnt := stpcnt-1
  end;

  { initialize and register identifier entry }
  procedure ininam(p: ctp);
  begin
     ctpcnt := ctpcnt+1; { count entry }
     p^.keep := false { clear keepme flag }
  end;

  { recycle identifier entry }
  procedure putnam(p: ctp);
  var p1: ctp;
  begin
     if (p^.klass = proc) or (p^.klass = func) then
        while p^.pflist <> nil do begin
        { scavenge the parameter list }
        p1 := p^.pflist; p^.pflist := p1^.next;
        putnam(p1) { release }
     end;
     putstrs(p^.name); { release name string }    
     dispose(p); { release entry }
     ctpcnt := ctpcnt-1 { remove from count }
  end;

  { recycle identifier tree }
  procedure putnams(p: ctp);
  begin
    if p <> nil then begin
      putnams(p^.llink); { release left }
      putnams(p^.rlink); { release right }
      { "keep" means it is a parameter and stays with it's procedure or
        function entry. }
      if not p^.keep then putnam(p) { release the id entry }
    end
  end;
     
  { scrub display level }
  procedure putdsp(l: disprange);
     var llp: lbp; lvp: csp; lsp: stp;
     { release substructure }
     procedure putsub(p: stp);
        var p1: stp;
     begin
        { clear record recycle list if record }
        if p^.form = records then begin
           { clear structure list }
           while p^.recyc <> nil do begin
              { remove top of list }
              p1 := p^.recyc; p^.recyc := p1^.next;
              putsub(p1) { release that element }
           end;
           putnams(p^.fstfld) { clear id list }
        end else if p^.form = tagfld then
           { recycle anonymous tag fields }
           if p^.tagfieldp^.name = nil then putnam(p^.tagfieldp);
        putstc(p) { release head entry }
     end;
  begin { putdsp }
    putnams(display[l].fname); { dispose of identifier tree }
    { dispose of label list }
    while display[l].flabel <> nil do begin
      llp := display[l].flabel; display[l].flabel := llp^.nextlab; putlab(llp)
    end;
    { dispose of constant list }
    while display[l].fconst <> nil do begin
      lvp := display[l].fconst; display[l].fconst := lvp^.next; putcst(lvp)
    end;
    { dispose of structure list }
    while display[l].fstruct <> nil do begin
      { remove top from list }
      lsp := display[l].fstruct; display[l].fstruct := lsp^.next; putsub(lsp)
    end
  end; { putdsp }

  { scrub all display levels until given }
  procedure putdsps(l: disprange);
  var t: disprange;
  begin
    if l > top then begin
      writeln('*** Error: Compiler internal error');
      goto 99
    end;
    t := top;
    while t > l do begin
      putdsp(t); t := t-1
    end
  end;

  { get external file entry }
  procedure getfil(var p: extfilep);
  begin
     new(p); { get new entry }
     filcnt := filcnt+1 { count entry }
  end;

  { recycle external file entry }
  procedure putfil(p: extfilep);
  begin
     dispose(p); { release entry }
     filcnt := filcnt-1 { count entry }
  end;

  { get case tracking entry }
  procedure getcas(var p: cip);
  begin
     new(p); { get new entry }
     cipcnt := cipcnt+1 { count entry }
  end;

  { recycle case tracking entry }
  procedure putcas(p: cip);
  begin
     dispose(p); { release entry }
     cipcnt := cipcnt-1 { count entry }
  end;

(*-------------------------------------------------------------------------*)

                { character and string quanta functions }

(*-------------------------------------------------------------------------*)

  { find lower case of character }
  function lcase(c: char): char;
  begin
    if c in ['A'..'Z'] then c := chr(ord(c)-ord('A')+ord('a'));
    lcase := c
  end { lcase };

  { convert string to lower case }
  procedure lcases(var s: idstr);
  var i: integer;
  begin
    for i := 1 to maxids do s[i] := lcase(s[i]);
  end;

  { find reserved word string equal to id string }
  function strequri(a: restr; var b: idstr): boolean;
  var m: boolean; i: integer;
  begin
    m := true;
    for i := 1 to reslen do if lcase(a[i]) <> lcase(b[i]) then m := false;
    for i := reslen+1 to maxids do if b[i] <> ' ' then m := false;
    strequri := m
  end { equstr };

  { write variable length id string to output }
  procedure writev(var f: text; s: strvsp; fl: integer);
  var i: integer; c: char;
  begin i := 1;
    while fl > 0 do begin
      c := ' '; if s <> nil then begin c := s^.str[i]; i := i+1 end;
      write(f, c); fl := fl-1;
      if i > varsqt then begin s := s^.next; i := 1 end
    end
  end;

  { find padded length of variable length id string }
  function lenpv(s: strvsp): integer;
  var i, l, lc: integer;
  begin l := 1; lc := 0;
    while s <> nil do begin
      for i := 1 to varsqt do begin
        if s^.str[i] <> ' ' then lc := l;
        l := l+1; { count characters }
      end;
      s := s^.next
    end;
    lenpv := lc
  end;

  { assign identifier fixed to variable length string, including allocation }
  procedure strassvf(var a: strvsp; var b: idstr);
  var i, j, l: integer; p, lp: strvsp;
  begin l := maxids; p := nil; a := nil; j := 1;
    while (l > 1) and (b[l] = ' ') do l := l-1; { find length of fixed string }
    if b[l] = ' ' then l := 0;
    for i := 1 to l do begin
      if j > varsqt then p := nil;
      if p = nil then begin 
        getstr(p); p^.next := nil; j := 1; 
        if a = nil then a := p else lp^.next := p; lp := p
      end;
      p^.str[j] := b[i]; j := j+1
    end;
    if p <> nil then for j := j to varsqt do p^.str[j] := ' '
  end;

  { assign reserved word fixed to variable length string, including allocation }
  procedure strassvr(var a: strvsp; b: restr);
  var i, j, l: integer; p, lp: strvsp;
  begin l := reslen; p := nil; a := nil; lp := nil; j := 1;
    while (l > 1) and (b[l] = ' ') do l := l-1; { find length of fixed string }
    if b[l] = ' ' then l := 0;
    for i := 1 to l do begin
      if j > varsqt then p := nil;
      if p = nil then begin