Programming Guide



sm_*ftog

Converts field references to selection group references

char *sm_ftog(int field_number, int *grp_occurrence);
char *sm_e_ftog(char *field_name, int element, int *grp_occurrence);
char *sm_i_ftog(char *field_name, int occurrence, int *grp_occurrence);
char *sm_n_ftog(char *field_name, int *grp_occurrence);
char *sm_o_ftog(int field_number, int occurrence, int *grp_occurrence);

field_name, field_number
The field whose group name is sought.

element
The element in field_name whose group name and group occurrence number is sought.

occurrence
The occurrence in the specified field whose group name and group occurrence number is sought.

grp_occurrence
On return, contains the group occurrence number that is currently in the specified field.

Environment

C only

Returns

Description

sm_ftog converts field references to group references. It returns the name of the selection group that contains the referenced field, and puts the field's group occurrence number into the address pointed to by grp_occurrence.

Use sm_i_gtof to convert selection group references back into field references.

Caution: This function returns a pointer to internal data that remains valid only for the duration of the current screen. Do not change the pointer. Doing so can yield unpredictable and possibly disruptive results.

See Also

sm_i_gtof