Difference between revisions of "AFILL()"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
Line 12: Line 12:
  
 
==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> 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.
+
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.
  
  

Revision as of 13:39, 26 July 2010

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(), ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_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


Products

Recital Server, Recital