Hello everybody,
I have to check an user input, received from an SMS command. The SMS command looks like "CMD,VALUE", where "VALUE" must be a number (integer or floating point, depending on the command). Is there a way to check that "VALUE" is a number ?
I know than there are commands in StarBasic or VBA (IsNumber or IsNumeric) to check that, but I couldn’t find something similar within CRBasic.
Thanks,
J. M.
You might try using `SplitStr` with option 0 for `SplitOption` and checking for NAN.
I think I've also had success with typecasting like this:
var inputstr as String var num inputstr = "18" num = inputstr