Re: [fpc-pascal] Variants vs. Variant Records

2005-07-24 Thread Florian Klaempfl
Agustin Barto wrote: > I have to build some container classes (like java Vector) for a > project. I was thinking on how to store some primitive values (so far > I only need to store Integer, Real or Extended and ShortString) and I > can't decide between variants (variant arrays) and variant records

re: [fpc-pascal] Variants vs. Variant Records

2005-07-23 Thread David Emerson
keep in mind that when Pascal stores a variant record, each record is the same size -- the maximally sized variant. So, for example, if you have type my_variant_record = record case rec_type : longint of 1: ( my_bool : boolean ); 2: ( p_to_ss : ^shortstring ); 3: ( x, y : longint );