HP SunSoft Pascal 4.0 Uživatelský manuál Strana 199

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 333
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 198
The FORTRAN–Pascal Interface 175
8
Records and Structures
In most cases, a Pascal record describes the same objects as its FORTRAN
structure equivalent, provided that the components have compatible types and
are declared in the same order. The compatibility of the types depends mostly
on size and alignment.
For more information, see “Compatibility of Types for FORTRAN and Pascal”
on page 164.
The FORTRAN main program,
ChrCAmain.f
character s*16
data s / "this is a string" /
call ChrCA( s, %VAL(0), %VAL(15) )
write( *, "(A)" ) s
stop
end
The commands to compile and
execute ChrCA.p and
CharCAmain.f
hostname% pc -c ChrCA.p
hostname% f77 ChrCA.o ChrCAmain.f -lpfc -lpc
ChrCAmain.f:
MAIN:
hostname% a.out
This is a string
Zobrazit stránku 198
1 2 ... 194 195 196 197 198 199 200 201 202 203 204 ... 332 333

Komentáře k této Příručce

Žádné komentáře