Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FlexFile Reference Guide - <b>a_fill()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 A_FILL()
 Fill all or a portion of an array with a specified value
-------------------------------------------------------------------------------

 Syntax

    A_FILL(  <aTarget>,
             <expValue>,
             [<idxPos>],
             [<nCount>] )

 Arguments

    <aTarget> is the array which will be filled.

    <expValue> is an expression which must evaluate to the same type
    as that of the array. This value will be placed in each element of
    the fill range.

    <idxPos> is the first position to in the <aTarget> array to fill.
    If not specified, the default value is the first element in the array.

    <nCount> is the number of elements to fill starting at <idxPos>.
    If not specified, elements are filled to the end of the array.

 Returns

    None.

 Description

    A_FILL() replaces <nCount> elements in the range beginning at
    <idxPos> with <expValue>. The value must be of the same type as
    the array.

    Wrapping will occur if <nCount> goes beyond the current row
    pointed to by <idxPos>. For example, if you have a two dimensional
    array with accounts in the first dimension and 12 prior period
    amounts in the second dimension, and you wanted to operate on the
    first quarter (i.e. 3 periods), making <nCount> three times the
    number of accounts will "wrap" around three periods. See the
    discussion on arrays in chapter 2 for more information on this
    feature.


 Examples

    // Declare a two dimensional (F)loating point array
    LOCAL rows, cols

    rows = 10
    cols = 20
    aFloat = A_DECLARE( "F", rows, cols )

    // Fill the second row of the array with 98.6
    A_FILL( aFloat, 98.6, A_(2, 1), cols )

See Also: A_STORE() A_ADD()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson