Verify Strings
ArborX


Summary
Test if a variable is an integer within the range 1 to 20.

Verify strings let you test a string for certain criteria, and return a result of true or false, depending on whether the string matched the given criteria or not, see the test option parameter.

This example of the 'i' option tests if the variable ^num contains an integer number in the range 1 to 20 and if so display to the screen.

 ^num=20 4
 ?=#^num,"1..20i"}show_me 6
 ?+#^num,"1..20i"}exit 8
 :show_me 10
 boxit ^num is valid^ 12
 :exit 14
 trun 0 16
11
Set the variable ^num to the value 20
13
If ^num contains an integer in the range 0 → 20 then jump to label
15
If ^num contains an integer greater than the range 0 → 20 then jump to label
17
Label
19
Using boxit display the contents of ^num and the following text
21
Label
23
Stop script

Document created on 08-Feb-2003 (revision 1)