The FORTRAN–Pascal Interface
179
8
Pascal Set Type
The Pascal set type is incompatible with FORTRAN.
Pascal
intset
Type
The Pascal
intset
type is predefined as
set of [0..127]
. A variable of
this type takes a minimum of 16 bytes of storage.
The Pascal procedure,
IntSetVar.p
, which has an
intset
of the elements
[1
,
3
,
7
,
8]
procedure intsetvar_(var s: intset);
begin
s := [1, 3, 7, 8]
end; { intsetvar_ }
The FORTRAN main program,
IntSetVarmain.f
integer*2 s(8)
pointer ( ps, s )
ps = malloc(16)
call IntSetVar ( s )
do i = 5, 8
write( *, 1 ) s(i), i
end do
1 format(o3,1x, 'octal (word', i2, ')')
write( *, "('110 001 010 (binary, word 8)')")
write( *, "('876 543 210 (bit nos, word 8)')")
stop
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......