To get the current contents of a data field or a memo field, call the field get function, fld_get():
|
||
|
|
|
|
|
|
|
|
|
To get the contents of a field in a scrollable region, call the function srf_get():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
These functions convert the data displayed in the field to the data type specified for the field and place the resulting value in the variable pointed to in the call. These function observes the field option settings that affect data conversion, such as PICSKIP and TRAILBLANKS. The underlying data variable for the field is not changed unless it is used as the variable to place the contents of the field in.
fld_get() can also be used to get the text of a menu field. In this case, the variable should be a string variable long enough to hold the menu field text plus a null terminator.
Caution: The data type of the variable passed must correspond to the field type. To avoid compiler warnings, it should be cast to type PTR in the function call. All string variables must be allocated before calling these functions.