PDA

View Full Version : Verify String to See If It's Numerical?


cpmusick
07-01-2003, 08:53 PM
I've tried looking in the help file and the forum, but I couldn't find the answer to my question.

Is it possible to make Setup Factory detect if a string is numerical or not? What I'm doing is making it edit a text file. It goes through every line in the file and if it start with a number, it will then change it to something else. However, if it's not a number, then I don't want it to change it.

So, can I make it check to see (on each line) if it's numerical?

Worm
07-01-2003, 11:39 PM
Multiply the variable by zero, if it is numeric, the result will be zero.

AssignValue(%IsNumeric%=%CustomVar% * 0)
IF (%IsNumeric% = 0)
The variable was numeric
END IF

cpmusick
07-02-2003, 12:45 AM
Thanks a lot. /ubbthreads/images/icons/smile.gif I got it to work.