Programming Guide |
Writes an integer value to a field
int sm_itofield(int field_number, int value);int sm_e_itofield(char *field_name, int element, int value);int sm_i_itofield(char *field_name, int occurrence, int value);int sm_n_itofield(char *field_name, int value);int sm_o_itofield(int field_number, int occurrence, int value);
field_name
,field_number
- The field to write.
element
- The element in
field_name
to write.occurrence
- The occurrence in the field to write.
value
- The integer value to write to the field or occurrence.
C only
- 0 Success.
sm_itofield
convertsvalue
to a string and places it in the specified field. If the string is longer than the field, Panther truncates it without warning on the left or right, according to the field's justification.
/* Find the length of the data in field number 12 */
sm_n_itofield("count", sm_dlength(12));