SizeOf sets (was: packed enumerated types?)

Adriaan van Os gpc at microbizz.nl
Tue Apr 8 18:01:40 CEST 2003


In the testprogram below, SizeOf( enum33) returns 4, which seems to me 
to be a bug.

Regards,

Adriaan van Os

----------

program test;

    type enum08 = ( a01, a02, a03, a04, a05, a06, a07, a08);
         enum16 = ( b01, b02, b03, b04, b05, b06, b07, b08,
                    b09, b10, b11, b12, b13, b14, b15, b16);
         enum17 = ( c01, c02, c03, c04, c05, c06, c07, c08,
                    c09, c10, c11, c12, c13, c14, c15, c16, c17);
         enum32 = ( d01, d02, d03, d04, d05, d06, d07, d08,
                    d09, d10, d11, d12, d13, d14, d15, d16,
                    d17, d18, d19, d20, d21, d22, d23, d24,
                    d25, d26, d27, d28, d29, d30, d31, d32);
         enum33 = ( e01, e02, e03, e04, e05, e06, e07, e08,
                    e09, e10, e11, e12, e13, e14, e15, e16,
                    e17, e18, e19, e20, e21, e22, e23, e24,
                    e25, e26, e27, e28, e29, e30, e31, e32, e33);

         set08  = set of enum08;
         set16  = set of enum16;
         set17  = set of enum17;
         set32  = set of enum32;
         set33  = set of enum33;

begin
   writeln( 'SizeOf( enum08)       = ', SizeOf( enum08));
   writeln( 'SizeOf( enum16)       = ', SizeOf( enum16));
   writeln( 'SizeOf( enum17)       = ', SizeOf( enum17));
   writeln( 'SizeOf( enum32)       = ', SizeOf( enum32));
   writeln( 'SizeOf( enum33)       = ', SizeOf( enum33));
end.




More information about the Gpc mailing list