[fpc-pascal] Something like "Is a number"?
chef at thomas-zastrow.de
Sat Jul 9 10:27:04 CEST 2005
John Coppens wrote:
>On Fri, 08 Jul 2005 16:39:05 +0200
>Thomas Zastrow <chef at thomas-zastrow.de> wrote:
>>I'm converting some strings with "strtoint" into integers. But
>>sometimes the string can't be converted to a number. Is there a
>>function which takes a string and tells me if it is possible or not to
>>convert it into a number? Something like "IsANumber(string)"
>You can use val(str, int/real, err)
>if err is 0, the string was converted to an integer or real (depending on
>the type of int/real.
Thank you, it's working!!!
More information about the fpc-pascal