Difference between revisions of "AFILL()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to fill a defined section of an array with an expression
 
Function to fill a defined section of an array with an expression
 
  
 
==Syntax==
 
==Syntax==
 
AFILL(<array> , <exp> [,<expN1> [,<expN2>]])
 
AFILL(<array> , <exp> [,<expN1> [,<expN2>]])
 
  
 
==See Also==
 
==See Also==
[[AADD()]], [[AAVERAGE()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
+
[[AADD()]], [[AAVERAGE()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[ARRAY()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
 
+
  
 
==Description==
 
==Description==
 
The AFILL() function fills the elements of a previously declared <array> with the specified <exp>.  The starting element I the array can be specified with <expN1> and the number of elements to fill with <expN2>.  If <expN1> is not specified, the fill starts from the first element.  If <expN2> is not specified, the fill will continue to the last element.  The AFILL() function returns .T. if successful and .F. otherwise.  All array elements can also be assigned a value using the = operator.
 
The AFILL() function fills the elements of a previously declared <array> with the specified <exp>.  The starting element I the array can be specified with <expN1> and the number of elements to fill with <expN2>.  If <expN1> is not specified, the fill starts from the first element.  If <expN2> is not specified, the fill will continue to the last element.  The AFILL() function returns .T. if successful and .F. otherwise.  All array elements can also be assigned a value using the = operator.
 
  
 
==Example==
 
==Example==
Line 29: Line 25:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Array Processing]]
 
 
[[Category:Array Processing Functions]]
 
[[Category:Array Processing Functions]]

Latest revision as of 09:02, 7 December 2012

Purpose

Function to fill a defined section of an array with an expression

Syntax

AFILL(<array> , <exp> [,<expN1> [,<expN2>]])

See Also

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

Description

The AFILL() function fills the elements of a previously declared <array> with the specified <exp>. The starting element I the array can be specified with <expN1> and the number of elements to fill with <expN2>. If <expN1> is not specified, the fill starts from the first element. If <expN2> is not specified, the fill will continue to the last element. The AFILL() function returns .T. if successful and .F. otherwise. All array elements can also be assigned a value using the = operator.

Example

declare matrix[100]
afill(matrix,"good",51,100)
? matrix[45]
.F.
? matrix[75]
good
? afill(matrix,"bad",1,50)
.T.
? matrix[45]
bad