[fpc-pascal] Tuples as variant arrays
Ryan Joseph
genericptr at gmail.com
Sat Jun 26 00:12:41 CEST 2021
Is it possible something like this could work? Seems like it should but I get an error (got MyRecord expected variant).
====================================
{$mode objfpc}
program unit_name;
type
TTuple = array of variant;
type
MyRecord = record
end;
var
t: TTuple;
r: MyRecord;
i: variant;
begin
t := [1,'string', r];
for i in t do
begin
writeln(i);
end;
end.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list