On 06.11.2014 04:43, Flávio Etrusco wrote:
Default values must be of ordinal, pointer or small set type (Delphi)
(See: 
http://docwiki.embarcadero.com/RADStudio/XE7/en/E2146_Default_values_must_be_of_ordinal,_pointer_or_small_set_type_%28Delphi%29)

After you added the 33-rd option now SizeOf(TGridOptions) = 32 bytes.
Every option is stored as a bit, so you can have 256 (=32*8) options (I think).

No, SizeOf(TGridOptions) = 4 (bytes) = 32 bits = 32 options.

If a 33rd option is added he's right:

=== code begin ===

program tsettest;

type
  TTest = (
    t1,
    t2,
    t3,
    t4,
    t5,
    t6,
    t7,
    t8,
    t9,
    t10,
    t11,
    t12,
    t13,
    t14,
    t15,
    t16,
    t17,
    t18,
    t19,
    t20,
    t21,
    t22,
    t23,
    t24,
    t25,
    t26,
    t27,
    t28,
    t29,
    t30,
    t31,
    t32,
    t33
  );

  TTests = set of TTest;

var
  t: TTests;
begin
  Writeln(SizeOf(t));
end.

=== code end ===

=== output begin ===

% ./tsettest
32

=== output end ===

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to