Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xscatter()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XSCATTER()
Move data from current record into an array

Syntax
N_XSCATTER([<aNames>] , <aData>)

Arguments
<aNames> a list of field names to be scattered to the corresponding elements 
in the second array,<aData>.

<aData> is the array that will receive data from the current record.

Remarks
If  you specify only one array to N_XSCATTER(),  it will move all the fields 
in the current record to the array. The number of fields scattered is the 
number of fields in the record, or the array size, which ever is less.

If  you specify two arrays then RaSQL uses the first array as a list of 
field names, the values of which it will store in the corresponding entries 
in the second array.

The function modifies the data type of each array element, if necessary, to 
reflect the data type of the field.

Example
N_XUSE('patients.dta, ... )
* Declare array of proper size
DECLARE data[N_XFCOUNT()]
N_XSCATTER(data)

* Declare two arrays
DECLARE data[2], names[2]
names[1] = 'last_name'
names[2] = 'first_name'
* Scatter two fields only 
N_XSCATTER(names, data)


See Also: N_XFETCH() N_XGATHER()

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