SRL Archive - Help

PointArray To Variant


Brandon

2012-05-28 14:17:38

Why can't I pass a PointArray to a Variant?

The below throws exceptions after the else statement.. If the TPA has a length > 1 then it throws exceptions wherever it was called.. I thought TVariants can accept any type :S


Function Nulled(What: Variant): Boolean;
begin
case varType(What) of
varInteger, varDouble, varInt64, varLongWord,
varShortInt, varWord, varSmallInt, varSingle: Result:= (What < 1);

else
Result:= (Length(What) < 1);
end;
end;

bg5

2012-05-28 18:50:31

It accepts only simple types - PascalScript.

masterBB

2012-05-28 19:09:35

Does Array of Variant works? probably not, but it is worth a try.

putonajonny

2012-05-28 19:18:28

From: masterBB
Does Array of Variant works? probably not, but it is worth a try.


It won't, sorry to disappoint you :(