Variant with Array Index |
Smart pascal source code
{ TApplication } procedure TApplication.RunApp; var b : Array [0 .. 5] Of String; v : Variant := '5'; Begin b[v] := '56'; v:=''; try b[v] := '56'; except on e: Exception do WriteLn(e.Message.Before(' (')); end; v := False; b[v] := '123'; WriteLn(b[5]); // 56 WriteLn(b[v]); // 123 WriteLn(b[0]) // { CONSOLE OUTPUT b = ["", "", "", "", "", "56", "": "56", false: "123"] }