Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!dslg0849 From: dslg0849@uxa.cso.uiuc.edu (Daniel S. Lewart) Newsgroups: comp.lang.pascal Subject: Re: need a little flexibility Message-ID: <1991Apr24.202210.807@ux1.cso.uiuc.edu> Date: 24 Apr 91 20:22:10 GMT References: <1991Apr24.183315.7997@ux1.cso.uiuc.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 27 amead@s.psych.uiuc.edu (alan mead) writes: > Block = record > x : byte; > y : byte; > ... > data : array[1..252] of byte; > dataW: array[1..126] of word ABSOLUTE data; > end; ... > And a variant record requires an exhaustive listing of it's fields right? I think this does what you want, by using variant records: const n = 126; type Block = record x,y: Byte; ... case Byte of 1 : (data : array[1..2*n] of Byte); 2 : (dataW: array[1..n] of Word); end; Daniel Lewart d-lewart@uiuc.edu