fork download
  1. type
  2. ValueType = (vt_Bool, vt_Double, vt_String);
  3.  
  4. // Хранит ty + объединение (boolv | doublev | stringv).
  5. ValueRec = record
  6. case ty: ValueType of
  7. vt_Bool: (boolv: boolean);
  8. vt_Double: (doublev: double);
  9. vt_String: (stringv: pchar);
  10. end;
  11.  
  12. begin
  13. writeln('sizeof(pointer) = ', sizeof(pointer));
  14. writeln('sizeof(ValueRec) = ', sizeof(ValueRec));
  15. end.
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
sizeof(pointer) = 8
sizeof(ValueRec) = 16