Log in

View Full Version : PointArray To Variant



Brandon
05-28-2012, 06:17 PM
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
05-28-2012, 10:50 PM
It accepts only simple types - PascalScript.

masterBB
05-28-2012, 11:09 PM
Does Array of Variant works? probably not, but it is worth a try.

putonajonny
05-28-2012, 11:18 PM
Does Array of Variant works? probably not, but it is worth a try.

It won't, sorry to disappoint you :(