Array of Variant example |
Smart pascal source code
var stat: array [0..3] of Variant; dyn: array of Variant; i: Integer; begin stat[0] := 1; stat[1] := 'two'; stat[2] := false; stat[3] := 3.14; for i := stat.Low to stat.High do Writeln(stat[i]); { CONSOLE OUTPUT 1 two False 3.14 } dyn.Add(1); dyn.SetLength(4); dyn[1] := 'two'; dyn[2] := false; dyn[3] := 3.14; for i := dyn.Low to dyn.High do Writeln(dyn[i]); { CONSOLE OUTPUT 1 two False 3.14 }