HP SunSoft Pascal 4.0 Bedienungsanleitung Seite 220

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 333
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 219
196 Pascal 4.0 Users Guide
8
Chapter 6, “The C–Pascal Interface,” has an example that matches the
following example.
The FORTRAN subroutine,
VarRec.f. The variable ALIGN
is integer*2 and is needed to
match the Pascal variant record
layout.
subroutine VarRec ( VRec )
structure /a_var/
character ch1, ch2
end structure
structure /b_var/
character flag
end structure
structure /c_var/
integer*2 ALIGN
end structure
structure /var_part/
union
map
record /a_var/ a_rec
end map
map
record /b_var/ b_rec
end map
map
record /c_var/ c_rec
end map
end union
end structure
structure /vrnt/
character tag
record /var_part/ var_rec
end structure
record /vrnt/ VRec
if ( VRec.var_rec.a_rec.ch1 .eq. 'a' )
& VRec.var_rec.a_rec.ch2 = 'Z'
return
end
Seitenansicht 219
1 2 ... 215 216 217 218 219 220 221 222 223 224 225 ... 332 333

Kommentare zu diesen Handbüchern

Keine Kommentare