Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GetIt Reference Guide - syntax: n_gather([<namesa> ,] <dataa>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_GATHER([<namesA> ,] <dataA>)

Gathers (replaces) database fields with data from specified array.

Example

* simulate a SET CARRY ON
DECLARE data[FCOUNT()]
GOTO BOTTOM
N_SCATTER(data)
APPEND BLANK
N_GATHER(data)

* replace selected fields in client record with data array
SELECT Client
DECLARE fields[3], data[3]
fields[1] = "Name"
fields[2] = "City"
fields[3] = "Phone"
N_GATHER(fields,data)

Notes

If only one array is specified then all fields in the DBF record are
replaced with the corresponding array element.  The number of elements
replaced is the smaller of the size of the array or the number of fields in
the DBF record.  If the array size is longer than the number of fields, then
the trailing array elements are ignored.

If two elements are specified then the first array is assumed to contain a
list of field names to be replaced with the corresponding element of the
second array.  The second array must be at least the same size as the first
array or the results will be undefined.

N_GATHER does not move memo fields.

See Also: N_SCATTER N_UPDATED

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