![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395198x1.png)
8
The Pascal procedure, IntCA.p. Pascal passes the bounds by value.
The FORTRAN main program, IntCAmain.f
Example 1:
procedure intca_(var a: array [lb..ub: integer] of integer);
begin
a[1] := 1;
a[2] := 2 end; { intca_ }
integer k integer s(0:2)
data | s / 0, 0, 0 / |
call IntCA ( s, %VAL(0), %VAL(2) ) do k = 0, 2
write( *, "(I1)" ) s(k) end do
stop end
The commands to compile and execute IntCA.p and
IntCAmain.f
hostname% pc
hostname% f77 IntCA.o IntCAmain.f
MAIN: hostname% a.out 0 1 2
The Pascal procedure, ChrCA.p. Pascal passes the bounds by value.
Example 2: Array of Characters
procedure chrca_(var a: array [lb..ub: integer] of char);
begin
a[0] := 'T';
a[13] := 'o' end; { chrca_ }
174 | Pascal 4.0 User’s Guide |