Difference between revisions of "ASCAN()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 8: Line 8:
  
 
==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()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]], [[SET EXACT]]
+
[[AADD()]], [[AAVERAGE()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[ARRAY()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]], [[SET EXACT]]
  
  
Line 30: Line 30:
  
  
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Array Processing]]
 
[[Category:Array Processing]]
 
[[Category:Array Processing Functions]]
 
[[Category:Array Processing Functions]]

Revision as of 08:38, 16 November 2011

Purpose

Function to search an array for an expression


Syntax

ASCAN(<array>, <exp>, [<expN>])


See Also

AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER, SET EXACT


Description

The ASCAN() function searches an array for the expression specified in <exp>. The expression may consist of any data type. It returns the element number at which the expression is located, or 0 if not found. The element number returned is the first occurrence of the string found. The SET EXACT command does not alter the find condition because the ASCAN() function works as if SET EXACT were OFF. The optional expression <expN> specifies the position at which to start the scan. If the <expN> is not specified then the search starts at the first element.


Example

use accounts
declare names[reccount(),1]
copy to array names fields company
element_no=ascan(names, "OK Cleaning Company")
if element_no > 0
    ? names[m->element_no]
    OK Cleaning Company
else
    dialog box "The company was not found."
endif