AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

fehlende VarTypes in D5

Ein Thema von shmia · begonnen am 19. Jul 2005 · letzter Beitrag vom 20. Jul 2005
 
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#1

fehlende VarTypes in D5

  Alt 19. Jul 2005, 17:42
Hallo,
anscheinend kennt D5 nicht alle VarTypes (es geht um den Datentyp Variant).
Deshalb musste ich in folgender Funktion schon nachhelfen:
Delphi-Quellcode:
function VarTypeAsString(const vt: Integer): string;
begin
   case vt and varTypeMask of
      varEmpty: Result := 'Empty';
      varNull: Result := 'Null';
      varSmallint: Result := 'SmallInt';
      varInteger: Result := 'Integer';
      varSingle: Result := 'Single';
      varDouble: Result := 'Double';
      varCurrency: Result := 'Currency';
      varDate: Result := 'Date';
      varOleStr: Result := 'OleStr';
      varDispatch: Result := 'Dispatch';
      varError: Result := 'Error';
      varBoolean: Result := 'Boolean';
      varVariant: Result := 'Variant';
      varUnknown: Result := 'Unknown';
      varString: Result := 'String';
      varAny: Result := 'Any';
      varByte: Result := 'Byte';

      $0e: Result := 'Decimal (16Byte)';
      $18: Result := 'void';
      $1b: Result := 'safe-array';
      $1d: Result := 'UserDef';

   else
      Result := Format('0x%.8x',[vt]);
   end;

   if (vt and varArray) <> 0 then
      Result := 'array of ' + Result;
   if (vt and varByRef) <> 0 then
      Result := '*'+Result;
end;
Nun fehlen mir noch die Entsprechungen zu $13 und $1A.
Und was fehlt sonst noch?
Andreas
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz