PDA

View Full Version : Testing a value to see if it's an integer/number/version


Lorne
10-02-2002, 11:10 AM
Here's a quick example I put together to show you how to test whether a string is (a) numeric, (b) an integer or (c) a version number.

It tests the value in the variable %value% and sets %IsNumeric% to true if that value is a number, and sets %IsInteger% to true if the value is a number and doesn't have any decimal places. If there are 2 or more decimal places, it sets %IsVersion% to true instead.

Give the attached .pg4 file (http://www.indigorose.com/ubbthreads/uploads/12370-integer_test.pg4) a look to see how it all works.

12370-integer_test.pg4 (http://www.indigorose.com/ubbthreads/uploads/12370-integer_test.pg4)