Tests whether Value a is contained by a range or closed interval with endpoints Value b and Value c, i.e. b £ a £ c or a Î [b,c].
Syntax
INRANGE(Value a, Value b, Value c)
Input
Value a | is a value |
Domain type: | any Value domain |
Value b | is a value |
Domain type: | any Value domain |
Value c | is a value |
Domain type: | any Value domain |
Output
INRANGE returns: | a boolean value, i.e. True, False or undefined |
Domain: | system domain Bool |
Note:
Tips:
Usable in
MapCalc, TabCalc, Simple calculators
Examples
Pocket line calculator examples:
? INRANGE(20,10,100) |
returns True |
? INRANGE(200,10,100) | returns False |
MapCalc example:
OutMap = INRANGE(InMap,1200,1500)
InMap |
OutMap |
||||||||||||||||||
|
|
OutMap = IFF(INRANGE(InMapA,1200,1500),InMapA,InMapB)
InMapA |
InMapB |
OutMap |
|||||||||||||||||||||||||||
|
|
|
If a pixel in map InMapA has a value that is larger than or equal to 1200, and at the same time the value of this pixel is less than or equal to 1500, then the orginal value of map InMapA is assigned in output map OutMap. For other pixels, the value of the pixel in InMapB is assigned.
TabCalc example:
OutCol1 = INRANGE(InColA,1200,1500)
OutCol2 = IFF(INRANGE(InColA,1200,1500),InColA,IncolB)
OutCol3 = IFF(INRANGE(InColA,900,1300),"Inside","Outside")
InColA |
InColB |
OutCol1 |
OutCol2 |
OutCol3 |
800 |
11 |
False |
11 |
Outside |
900 |
12 |
False |
12 |
Inside |
1000 |
? |
False |
? |
Inside |
-900 |
-6 |
False |
-6 |
Outside |
0 |
3 |
False |
3 |
Outside |
1200 |
-15 |
True |
1200 |
Inside |
? |
3 |
? |
? |
? |
1300 |
16 |
True |
1300 |
Inside |
1600 |
19 |
False |
19 |
Outside |