modify_enumerated_strings_c
status.i4.v = modify_enumerated_strings_c(num_values.i4.v, text.i1a.r,
entry_length.i4.v,
enumerated_id.i4.v,
help_info.sa.r
[,values.i4a.r])
This routine modifies the text strings associated with an
enumerated data type used by the 'numeric_to_ascii(_c)',
'ascii_to_numeric(_c)', '(window_)display_value(_c)',
'(window_)input_value(_c)', and 'winput(_c)' routines. The
present values for these strings can be read by a call to
'get_enumerated_strings'.
num_values number of enumerated entries
text enumerated text strings
entry_length number of characters per enumerated text entry
enumerated_id ID number of the enumerated data set which was
returned by 'set_enumerated_strings_c' (Passing
a value of zero for this argument would result in
the modification of the default enumerated data
type.)
help_info entry by entry help callback information
(array of HELP_CALLBACK_DATA structures)
(A value of NULL can be passed for this argument,
if no context sensitive entry help is desired.)
[values] enumerated numeric values
(If a value of NULL is passed for this argument,
values will be assigned consecutively starting
at 0.)
(default is NULL)
This function returns ACNET status values as follows:
CBS_OK success
CBS_INVARG invalid number of values or entry length
CBS_INVID invalid enumerated ID
CBS_NO_SUCH enumerated data type does not exist
CBS_MEMFAIL dynamic memory allocation failure
CBS_INVSIZ all passed strings are null strings
This function requires the following include files:
cnsparam_h, cns_data_structs_h, cbslib_h, acnet_errors_h
Related functions:
set_enumerated_strings_c, get_enumerated_strings,
get_enumerated_string_array_c, set_enumerated_string_array_c,
ascii_to_numeric(_c), numeric_to_ascii(_c), get_logical_strings,
set_logical_strings, create_user_data_type_c,
get_bit_mask_strings_c, set_bit_mask_strings_c,
window_display_value(_c), window_input_value(_c), winput(_c)
C/C++ usage:
static char text[NUM_VALUES][ENTRY_LENGTH+1] = {"string1", "string2"};
int status;
int num_values = NUM_VALUES;
int entry_length = ENTRY_LENGTH + 1;
int enumerated_id = 0;
int values[NUM_VALUES] = {0, 1};
HELP_CALLBACK_DATA *help_info = (HELP_CALLBACK_DATA *) NULL;
status = modify_enumerated_strings_c(num_values,(char *) text,
entry_length,enumerated_id,
help_info,values);