Difference between revisions of "INRANGE()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to determine whether a specified expression is between two other specified expressions
 
Function to determine whether a specified expression is between two other specified expressions
 
  
 
==Syntax==
 
==Syntax==
 
INRANGE(<exp1>,<exp2>,<exp3>)
 
INRANGE(<exp1>,<exp2>,<exp3>)
 
  
 
==See Also==
 
==See Also==
 
[[BETWEEN()]], [[CHROVERLAP()]], [[EMPTY()]], [[EVALUATE()]], [[EXPRCHECK()]], [[INLIST()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[TYPE()]], [[VARTYPE()]]
 
[[BETWEEN()]], [[CHROVERLAP()]], [[EMPTY()]], [[EVALUATE()]], [[EXPRCHECK()]], [[INLIST()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[TYPE()]], [[VARTYPE()]]
 
  
 
==Description==
 
==Description==
 
The INRANGE() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type.  The INRANGE() function operates on Character, Date and Numeric expressions.
 
The INRANGE() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type.  The INRANGE() function operates on Character, Date and Numeric expressions.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 25: Line 21:
 
|-
 
|-
 
|}
 
|}
 
  
 
The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for INRANGE() to return true (.T). If <exp1> is not within this range, INRANGE() returns false (.F.).
 
The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for INRANGE() to return true (.T). If <exp1> is not within this range, INRANGE() returns false (.F.).
 
  
 
==Example==
 
==Example==
Line 40: Line 34:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Expressions and Type Conversion]]
 
[[Category:Expressions and Type Conversion]]
 
[[Category:Expressions and Type Conversion Functions]]
 
[[Category:Expressions and Type Conversion Functions]]

Revision as of 13:10, 10 February 2012

Purpose

Function to determine whether a specified expression is between two other specified expressions

Syntax

INRANGE(<exp1>,<exp2>,<exp3>)

See Also

BETWEEN(), CHROVERLAP(), EMPTY(), EVALUATE(), EXPRCHECK(), INLIST(), ISALPHA(), ISBLANK(), ISDIGIT(), MAX(), MAXVALUES(), MIN(), MINVALUES(), TYPE(), VARTYPE()

Description

The INRANGE() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type. The INRANGE() function operates on Character, Date and Numeric expressions.

Parameters Description
<exp1> The expression to be checked.
<exp2> Expression representing the range minimum.
<exp3> Expression representing the range maximum.

The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for INRANGE() to return true (.T). If <exp1> is not within this range, INRANGE() returns false (.F.).

Example

? inrange(date(),date()-10,date()+10)
.T.
? inrange("A", "A", "Z")
.T.
? inrange(10,1,9)
.F.