Difference between revisions of "AFILL()"

From Recital Documentation Wiki
Jump to: navigation, search
Line 38: Line 38:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Array Processing]]
 +
[[Category:Array Processing Functions]]

Revision as of 15:36, 1 June 2009

Class

Array Processing


Purpose

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


Syntax

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


See Also

AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, AROW(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, 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> and <expN2> are not specified, all elements will be filled. 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


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer