<< Click to Display Table of Contents >> Navigation: User guide > Logic > Simple test on wvar |
wvar / wconstant the exact value of the constant
wvar / wconstant..wconstant2 any value in the range given (inclusive)
wvar / >wconstant any value greater than the constant
wvar / <wconstant any value less than the constant (or U)
wvar / B the value 0
IMPORTANT: when testing fields, ivars, wvars, and cells for being less than a given value, U (undefined) is in fact a large negative number and will be included in any test using < (less than).
IMPORTANT: a mvar does not always contain an exact value.
This means that the definition:
d $lowhigh=$ratio/0.0..15.0,16.0..999.0,
will not pick up any value between 15.000001 and 15.999999. The safest way to test an wvar is to move the value to an ivar and then test the ivar. The value put into the ivar must not exceed 10 digits, so you may need to divide first. For example:
d $range=$wpr/0..999.0,1000.0..1999.0,>1999.0,
should be written:
d $ipr=$wpr/1000.0,
d $range=$ipr/0,1,>1,
Examples of simple tests on wvars:
$wcnt/10.0,
$wsum/1.0..5.0,
$total/>99.99999,
$area/<100.0,
$iwant/b,
$iwant/0.0,
$werr/u,