Programming Guide |
Clears all data in an array
int sm_clear_array(int field_number);int sm_n_clear_array(char *field_name);int sm_1clear_array(int field_number);int sm_n_1clear_array(char *field_name);
field_name
,field_number
- A field in the array to clear.
- 0 Success.
sm_clear_array
clears all data from the array that containsfield_number
orfield_name
and resets the number of occurrences in the array to 0. The array is cleared even if it is protected from clearing.
sm_1clear_array
andsm_n_1clear_array
only clear the specified array;sm_clear_array
andsm_n_clear_array
also clear arrays synchronized with the array unless they are protected from clearing.
/* Clear the entire array of "names" and arrays
* synchronized with "names". */
sm_n_clear_array("names");
/* Clear the "totals" column of a screen,
* without clearing arrays synchronized with "totals". */
sm_n_1clear_array("totals");