Page 1 of 1
How to return the type of a variable ?
Posted: May 4th, 2017, 3:29 pm
by thierryt
Hi all,
please i need a function who return the type (numeric or alpha) of an item of dictionnary.
thanks !
Re: How to return the type of a variable ?
Posted: May 4th, 2017, 5:51 pm
by Gregory Martin
There's no built-in function to do this, but you could do something like this:
function IsNumeric(string itemName)
IsNumeric = ( getvalue(itemName) <> default );
end;
This would work in most cases, though if the item was numeric and value happened to be default, then it would falsely report as being alpha.
Re: How to return the type of a variable ?
Posted: May 4th, 2017, 6:55 pm
by thierryt
OK Martin,
thank you !