_Store( ) API Library Routine

See Also   Example

Replaces the memory variable specified by loc with the value val.

Syntax

int _Store(Locator FAR *loc, Value FAR *val)
Locator FAR *loc;            /* Memory variable locator. */
Value FAR *val;               /* Value to store. */

Remarks

Reference individual array elements by setting l_subs to the number of subscripts you specified and l_sub1 and l_sub2 to the actual subscripts. The first element of an array is numbered 1. If loc specifies an array and l_subs is 0, _Store( ) stores the value in val to all elements in the array.

_Store( ) returns 0 if it is successful. If it fails, _Store( ) returns a negative integer whose absolute value is a Visual FoxPro error number. If _Store( ) runs out of memory while storing to an array, some values of some array elements may have been set, and others may not have been.

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.