structure_convert_floats_c
status.i4.v = structure_convert_floats_c(name.i1a.r,
conversion_type.i4.v,
data_buffer.g.v,
num_converted.i4.r)
This routine converts the floating point values in a named
structure. If the named structure contains no floating point
fields, the data buffer will not be modified.
name null terminated structure name
(Note: The name format is [{class}.]{struct}.)
conversion_type type of floating point conversion to perform
(FP_IEEE_TO_DEC -> convert IEEE format to DEC format,
FP_DEC_TO_IEEE -> convert DEC format to IEEE format)
data_buffer data buffer containing floating point values to convert
num_converted returned number of conversion actually made
(A value of NULL can be passed for this argument
if this value is not needed.)
This function returns status values as follows:
OK success
CLIB_MEMFAIL dynamic memory allocation failed
CLIB_NO_SUCH structure name was not found
CLIB_INVARG invalid conversion type supplied
This function requires the following include files:
cbslib_h, clib_h, acnet_errors_h
Related functions:
structure_field_data, structure_field_info, structure_size_c,
structure_get_defaults_c, structure_name_exists, structure_get_names_c,
structure_menu_c, structure_edit_c, structure_cache,
structure_convert_enum_value_c, structure_build_name,
structure_parse_name, structure_get_description
C/C++ usage:
static const char name[] = "my class.my structure";
char data_buffer[STRUCTURE_SIZE];
int status;
int num_converted;
status = structure_convert_floats_c(name,(void *) data_buffer,
&num_converted);