EDCS Reference Manual
Functions
EDCS ConvertQuantityLongFloatValue
extern EDCS_Status_Code
EDCS_ConvertQuantityLongFloatValue
(
constEDCS_Long_Float_Value *from_value,1
EDCS_Long_Float_Value *to_value2
);

Definition

Given a numeric quantity (src_quantity) specified with a given unit (src_unit) and scale (src_scale), convert that quantity to a specified unit and scale.


Returns

EDCS_SC_SUCCESS and *dest_quantity_ptr is set to the result of the specified conversion, if valid parameters were passed in.
EDCS_SC_NULL_REQUIRED_PARAMETER and *dest_quantity_ptr is left unchanged, if dest_quantity_ptr was NULL.
EDCS_SC_INVALID_INPUT_UNIT and *dest_quantity_ptr is set to zero (0), if src_unit is not a valid EU code.
EDCS_SC_INVALID_OUTPUT_UNIT and *dest_quantity_ptr is set to zero (0), if dest_unit is not a valid EU code.
EDCS_SC_INVALID_INPUT_UNIT_SCALE and *dest_quantity_ptr is set to zero (0), if src_scale is not a valid ES code.
EDCS_SC_INVALID_OUTPUT_UNIT_SCALE and *dest_quantity_ptr is set to zero (0), if dest_scale is not a valid ES code.
EDCS_SC_UNITS_NOT_EQUIVALENT and *dest_quantity_ptr is set to zero (0), if src_unit and dest_unit do not belong to the same EQ.

Parameters Notes

1 the from value

2 the to value


Prev: EDCS_CompareStrings. Next: EDCS_ConvertQuantityValue. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS