1(* 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)varnt.p 5.1 (Berkeley) 04/16/91 8 *) 9 10program varnt(input, output); 11type 12 vrec = record 13 rfield : integer; 14 case integer of 15 1: ( 16 vfield : integer; 17 ); 18 2: ( 19 vfield2 : real; 20 ); 21 end; 22 23var 24 r : vrec; 25begin 26 r.vfield := 1; 27 r.vfield2 := 2.5; 28 r.rfield := 0; 29 writeln('done'); 30end. 31