8

The Pascal procedure, IntSetVar.p, which has an intset of the elements [1, 3, 7, 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.

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

The FORTRAN–Pascal Interface

179

Page 203
Image 203
HP SunSoft Pascal 4.0 manual Pascal Set Type, FORTRAN-Pascal Interface 179