![]() | Programming Guide | ![]() |
Copies the contents of one array to another
int sm_copyarray(int target_fnum, int source_fld);int sm_n_copyarray(char *target_fname, char *source_name);
target_fnum,target_fname- An element in the array to receive the data.
source_fld,source_name- An element in the source array.
sm_copyarrayandsm_n_copyarraycopy the contents of the specified source array into a target array. For each destination array occurrence, themdtproperty is set toPV_YESand thevalidedproperty toPV_NOto indicate that the occurrence is modified and needs validation.Because
sm_copyarrayreferences fields by number, they must be on the current screen.sm_n_copyarraylooks for the named fields first in the current screen; if the screen omits one or both of the specified arrays, the function looks for the named entry in the current LDB. If found there,sm_n_copyarraygets the data from or writes to that entry.Source and target arrays must be compatible to ensure the integrity of the copied data. Otherwise, Panther handles differences between the two arrays as follows:
- If the source data is too long for its target, Panther truncates it automatically and issues no warning.
- If the data is too short, Panther pads the target occurrence with spaces.
sm_clear_array, sm_getfield, sm_putfield
![]()
![]()
![]()
![]()