Puts a string into a fieldint sm_putfield(int field_number, char *data);int sm_e_putfield(char *field_name, int element, char *data);int sm_i_putfield(char *field_name, int occurrence, char *data);int sm_n_putfield(char *field_name, char *data);int sm_o_putfield(int field_number, int occurrence, char *data);
- The field to receive the contents of
- The element in array
field_nameto receive the string.
- The occurrence in the field to receive the string.
- A pointer to the string to put in the specified field or occurrence.
sm_putfieldmoves the string in
datainto the specified field, if it differs from the existing value. If the string is too long, Panther truncates it without warning. If the string is shorter than the destination field, Panther blank fills it according to the field's justification. If data points to an empty string, the field is cleared. This refreshes date and time fields that take system values.
sm_putfieldsets the field's
PV_YESto indicate that it is modified, and clears its valided property to
PV_NOto indicate that the field requires validation on exit. If you use variants
field_nameis absent from the screen, the value of data is put in the corresponding LDB entry.
sm_putfield(1, "This string has 29 characters");
sm_deselect, sm_dtofield, sm_getfield, sm_itofield, sm_ltofield