Hi all,
please i need a function who return the type (numeric or alpha) of an item of dictionnary.
thanks !
How to return the type of a variable ?
-
Gregory Martin
- Posts: 1948
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: How to return the type of a variable ?
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.IsNumeric = ( getvalue(itemName) <> default );
end;
-
thierryt
- Posts: 52
- Joined: April 26th, 2017, 12:17 pm
Re: How to return the type of a variable ?
OK Martin,
thank you !
thank you !