Einzelnen Beitrag anzeigen

Guido Eisenbeis

Registriert seit: 9. Apr 2006
389 Beiträge
 
Delphi 10.3 Rio
 
#10

Re: [Variants] 0 = Unassigned, wieso das denn?

  Alt 8. Jul 2008, 19:40
.
Hier noch schnell die Deklarationen nachgeschoben. Vielleicht hilfts!

Delphi-Quellcode:
function Unassigned: Variant;
begin
  _VarClear(TVarData(Result));
end;

procedure _VarClear(var V: TVarData);
begin
  // byrefs and those inline data types are easy
  if (V.VType and varDeepData) = 0 then
    V.VType := varEmpty
  else
    VarClearDeep(V);
end;

--------------------------------------------

function Null: Variant;
begin
  _VarNull(TVarData(Result));
end;

procedure _VarNull(var V: TVarData);
begin
  _VarClear(V);
  V.VType := varNull;
end;
Guido.
  Mit Zitat antworten Zitat