[patch_done] ZVariant

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
scheurer
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 23.02.2007, 12:52

[patch_done] ZVariant

Post by scheurer »

The Type TZVariant in all versions is a real memory waster.
Putting vtBoolean,vtFloat.vtDatetime and vtPointer in a case record
saves memory with any loss in function.

{** Defines a variant structure. }
TZVariant = packed record
VType: TZVariantType;
VString: AnsiString;
VUnicodeString: WideString;
VInterface: IZInterface;
//### 08.02.2010 Scheurer vtBoolean, vtInteger are alternatives
//### and not additive
case TZVariantType of
vtBoolean: (VBoolean: Boolean);
vtInteger: (VInteger: Int64);
vtFloat: (VFloat: Extended);
VtDateTime: (VDateTime: TDateTime);
VtPointer: (VPointer: Pointer);
end;

vtString, vtUnicodestring and vtInterface are not allowed in case records.

K.Scheurer
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN Rev 790.
Image
Post Reply