DecimalCmp
f90VB Modules
f90VBDefs, f90VBVariants
Summary
Compares two decimal type values.
Syntax
| integer(HRESULT_KIND) function DecimalCmp | (DecLeft, DecRight) |
| type(DECIMAL),intent(in):: | DecLeft |
| type(DECIMAL),intent(in):: | DecRight |
Arguments
DecLeft and DecRight [Input]
Two decimal values. Must be initialized variants (i.e. with vtType=VT_DECIMAL)
Comments
The function returns one of the following values:
| Return value: | If: | |
| 0 | The DecLeft is less than DecRight. | |
| 1 | The two decimal values are equal. | |
| 2 | The DecLeft is greater than DecRight. | |
| 3 | Either variant is NULL. | |
If an error occurs, the function may also return an error code as indicated in the following table:
| Return value: | Description | |
| DISP_E_BADVARTYPE | One or both of the passed variant types are not a valid type of variant. | |
| DISP_E_TYPEMISMATCH | At least one of the variants could not be coerced to the appropriate type for this operation. | |
| E_INVALIDARG | One of the arguments is invalid. | |
Related Topics
| For information about: | See: | |
| Variant comparisons | VariantCmp | |