Programming Guide



sm_*itofield

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.

Environment

C only

Returns

Description

sm_itofield converts value 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.

Example

/* Find the length of the data in field number 12 */

sm_n_itofield("count", sm_dlength(12));

See Also

sm_intval