AGB  ·  Datenschutz  ·  Impressum  







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

Variant Array verstehen

Ein Thema von sakura · begonnen am 10. Sep 2002 · letzter Beitrag vom 11. Sep 2002
 
jbg

Registriert seit: 12. Jun 2002
3.485 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2
  Alt 10. Sep 2002, 17:46
Aus der Online Hilfe:
Zitat:
The following example creates a one-dimensional variant array with five elements. Each of the elements are of type Variant, and can therefore contain values of varying types, as is illustrated by the example. Notice in particular how the value of the last element of the array is itself a variant array.
Code:
[b]var[/b]
  A: Variant;
[b]begin[/b]
  A := VarArrayCreate([0, 4], varVariant);
  A[0] := 1;
  A[1] := 1234.5678;
  A[2] := 'Hello world';
  A[3] := True;
  A[4] := VarArrayOf([1, 10, 100, 1000]);
  WriteLn(A[2]);   [i]{ Hello world }[/i]
  WriteLn(A[4][2]);   [i]{ 100 }[/i]
[b]end;[/b]
Daraus erschließe ich, dass du nur Data[xyz] schreiben musst, um auf die Elemente zugreifen zu können.
  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 11:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz