The FORTRAN–Pascal Interface
177
8
Variant Records
FORTRAN equivalents of variant records can sometimes be constructed,
although there is some variation with architecture, and sometimes you need to
adjust the alignment.
The Pascal procedure,
VarRec.p
type vr = record
case tag: char of
'a': ( ch1, ch2: char ) ;
'b': ( flag: boolean ) ;
'K': ( ALIGN: integer ) ;
end ;
procedure varrec_ ( var Rec: vr ) ;
begin
if ( Rec.ch1 = 'a' )
then Rec.ch2 := 'Z'
end; { VarRec.p }
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......