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_xfetch()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XFETCH()
Store value from field(s) into specified memory variable(s)

Syntax
N_XFETCH(<Field1> [, @<MemVar1>
      [, <Field2>, @<MemVar2>...]])

Arguments
<Field> is the source field. You can specify the field by name or by field 
number. If you use a field name, case is ignored.

<MemVar> is an optional argument that specifies a memory variable to receive 
the value of <Field>. The initial data type and length of the variable are 
not important since N_XFETCH() will adjust them as necessary.

You may move multiple fields in one statement by repeating the construction: 
<Field>, @<MemVar>, ...

Returns
N_XFETCH(<Field>) returns the value of the specified field in the current 
record.

NIL if <Field> is invalid or no table is open in the current area (.F. in
Summer-87).  Use N_XERROR() to get an error code.

Remarks
N_XFETCH(<Field>, @<MemVar>) moves the field specified in the first argument 
into the memory variable specified in the second argument. You must prefix @ 
to the memory variable name, and insure that the variable already exists.

Examples
* Create memvars; then store field values
STORE .F. TO lname, fname, mname 
N_XFETCH('last_name', @lname, ;
           'first_name', @fname, ;
           'middle_name', @mname)

* Same thing using the
* return value of N_XFETCH()
lname = N_XFETCH('last_name')
fname = N_XFETCH('first_name')
mname = N_XFETCH('middle_name')


See Also: N_XREPLACE()

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