R Code - Range Check
The R code returns a value that falls within one of several specified ranges; otherwise, it returns null.
Input Conversion
Input conversion does not invert. It simply applies the range check to the input data.
Syntax
Rstart,end{;start,end}...
Syntax Elements
start is the starting integer of the range. It can be positive or negative.
end is the ending integer of the range. It may be positive or negative, but it must be equal to or greater than start.
Examples
The following codes yield the indicated results:
Data |
R1,10 |
R100,999 |
R-100,-1 |
---|---|---|---|
-345 |
|
|
|
-99 |
|
-99 |
|
-30.123 |
|
-30.123 |
|
-3.123 |
|
-3.123 |
|
-1 |
|
-1 |
|
0 |
|
||
0.34 |
|
||
1 |
1 |
||
1.2 |
1.2 |
||
2 |
2 |
||
3.123 |
3.123 |
||
6 |
6 |
||
23 |
|
||
100.34 |
|
100.34 |
|
679 |
|
679 |