Difference between revisions of "IN ARRAY()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
− | + | Function to search an array for an expression | |
==Syntax== | ==Syntax== | ||
− | + | IN_ARRAY(<exp>, <array>) | |
==See Also== | ==See Also== | ||
− | + | [[AADD()]], [[AAVERAGE()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]], [[SET EXACT]] | |
==Description== | ==Description== | ||
− | + | The IN_ARRAY() function searches the array <array> for the expression specified in <exp>. The expression may consist of any data type. It returns .T. (true) if the expression is located, or .F. (false) if not found. | |
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | open database southwind | |
+ | use example | ||
+ | declare names[reccount(),1] | ||
+ | copy to array names fields start_date | ||
+ | valid_date = in_array({02/09/2000}, names) | ||
</code> | </code> | ||
− | |||
+ | ==Products== | ||
+ | Recital, Recital Server | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Array Processing]] | ||
+ | [[Category:Array Processing Functions]] |
Latest revision as of 10:24, 5 November 2009
Purpose
Function to search an array for an expression
Syntax
IN_ARRAY(<exp>, <array>)
See Also
AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, AROW(), ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER, SET EXACT
Description
The IN_ARRAY() function searches the array <array> for the expression specified in <exp>. The expression may consist of any data type. It returns .T. (true) if the expression is located, or .F. (false) if not found.
Example
open database southwind use example declare names[reccount(),1] copy to array names fields start_date valid_date = in_array({02/09/2000}, names)
Products
Recital, Recital Server