Programming Guide



sm_ltofield

Writes a long integer value to a field

int sm_ltofield(int field_number, long value);
int sm_e_ltofield(char *field_name, int element, long value);
int sm_i_ltofield(char *field_name, int occurrence, long value);
int sm_n_ltofield(char *field_name, long value);
int sm_o_ltofield(int field_number, int occurrence, long value);

field_name, field_number
The field to receive value.

element
The element in field_name to receive value.

occurrence
The occurrence in the specified field to receive value.

value
A long integer to put into the specified field.

Environment

C only

Returns

Description

The long integer passed to this function is converted to user-readable format and placed in field_number. If the number is longer than the field, it is truncated without warning, on the right or left depending on the field's justification.

Example

#include <smdefs.h>

/* Set the number of fish in the sea to a
* smallish number. */

#define MEDITERRANEAN 4

sm_i_ltofield("seas", MEDITERRANEAN, 14L);

See Also

sm_itofield, sm_lngval