Page 1 of 1

Verify the integer value in parameter

Posted: Fri Jan 09, 2015 9:47 pm
by elee123
Hi Everyone,
How do you make sure that whoever runs the TI Process does not enter a decimal value in the parameter prompt in tm1 ?
What I’m thinking is doing a check in Prolog, using iF statement. I’d like to do ProcessQuit if user types in a decimal value. But I can’t think of a function that detects decimal value in parameter and then return a 1 or 0.

Re: Verify the integer value in parameter

Posted: Fri Jan 09, 2015 9:48 pm
by Alan Kirk
elee123 wrote:Hi Everyone,
How do you make sure that whoever runs the TI Process does not enter a decimal value in the parameter prompt in tm1 ?
What I’m thinking is doing a check in Prolog, using iF statement. I’d like to do ProcessQuit if user types in a decimal value. But I can’t think of a function that detects decimal value in parameter and then return a 1 or 0.
Just compare the parameter value to the return value of the Int(Parameter) function. If they're the same you're good to go, if they're not you quit.

Re: Verify the integer value in parameter

Posted: Mon Jan 12, 2015 1:38 pm
by elee123
Thanks Alan. You've been helpful.