HP SunSoft Pascal 4.0 Manual do Utilizador Página 203

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 333
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 202
1 2 ... 198 199 200 201 202 203 204 205 206 207 208 ... 332 333

Comentários a estes Manuais

Sem comentários