Ceci est une ancienne révision du document !


Variant

A Savoir

L'equivalent de NIL en Variant est Unassigned
MyVar:=Unassigned

Les VarTypes

   varEmpty = 0;
   varNull = 1;
   varSmallInt = 2;
   varInteger = 3;
{$ifndef FPUNONE}
   varSingle = 4;
   varDouble = 5;
   varDate = 7;
{$endif}
   varCurrency = 6;
   varOleStr = 8;
   varDispatch = 9;
   varError = 10;
   varBoolean = 11;
   varVariant = 12;
   varUnknown = 13;
   varDecimal = 14;
   varShortInt = 16;
   varByte = 17;
   varWord = 18;
   varLongWord = 19;
   varInt64 = 20;
   varQWord = 21;
 
   varRecord = 36;
 
   { The following values never appear as TVarData.VType, but are used in
     TCallDesc.Args[] as aliases for compiler-specific types.
     (since it provides only 1 byte per element, actual values won't fit)
     The choice of values is pretty much arbitrary. }
 
   varStrArg = $48;         { maps to varstring }
   varUStrArg = $49;        { maps to varustring }
 
   { Compiler-specific variant types (not known to COM) are kept in
    'pseudo-custom' range of $100-$10E. Real custom types start with $10F. }
 
   varString = $100;
   varAny = $101;
   varUString = $102;
   varTypeMask = $fff;
   varArray = $2000;
   varByRef = $4000;
Vous pourriez laisser un commentaire si vous étiez connecté.