[inherit('sys$library:starlet')] program constructor_1(output); var fab : fab$type; xab : xab$type; fn : string(32); begin { As an extension to Extended Pascal, VAX } { Pascal allows record fields in variant } { records to be specified in the 'fixed' } { portion of a record constructor. The } { fields can be specified in any order as } { long as the fields do not overlap in } { memory. This is particularly useful when } { you have a variant record describing one } { large data structure, FAB$TYPE from } { STARLET.PEN for example. } fn := 'datafile.dat'; fab := fab$type[ fab$b_bid : fab$c_bid; fab$b_bln : fab$c_bln; fab$l_fna : iaddress(fn.body); fab$b_fns : length(fn); fab$v_get : true; fab$l_xab : iaddress(xab); otherwise zero]; xab := xab$type[ xab$b_cod : xab$c_dat; xab$b_bln : xab$c_datlen; otherwise zero]; end.