Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

AMOVE( aArray, pTarget, nDest[, nFrom ] )

Purpose

Move an array element from one position in the array to another.

Arguments

     aArray -- array in which the element will be moved

     pTarget -- the array element to move

     nDest -- the ordinal position into which pTarget
                  is to be moved

     nFrom -- if specified, the ordinal position of the array element
                  to move, otherwise a search for pTarget is performed
                  on the array

Setup

None.

Example

     LOCAL my_array := { "I", "speak", "well", "English" }

     ADISPLAY( AMOVE( my_array, "well", 4 ) )

Returns

aArray, with pTarget relocated as required.

Side Effects

Moves pTarget from its current position in aArray to nDest,
bumping other array elements up or down as required.

Artful Calls

MINIMAX

Source File

AA_AMOVE.PRG

Notes

If nFrom is not specified, a call to Clipper 5.0's ASCAN() is employed
to find pTarget. As such, if pTarget is in itself an array, you
must specify nFrom (since ASCAN() does not support the ability to
compare two arrays for equality).

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