HP SunSoft Pascal 4.0 Manuel d'utilisateur Page 203

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 333
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 202
The FORTRAN–Pascal Interface 179
8
Pascal Set Type
The Pascal set type is incompatible with FORTRAN.
Pascalintset 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
Vue de la page 202
1 2 ... 198 199 200 201 202 203 204 205 206 207 208 ... 332 333

Commentaires sur ces manuels

Pas de commentaire