Announcement

Collapse
No announcement yet.

Testing a value to see if it's an integer/number/version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing a value to see if it's an integer/number/version

    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 a look to see how it all works.

    12370-integer_test.pg4
    --[[ Indigo Rose Software Developer ]]
Working...
X