The SEDRIS Data Representation Model
APPENDIX D - Functions
SE CompareAttributeValues
extern int
SE_CompareAttributeValues
(
constEDCS_Attribute_Value *a_ptr, (notes)
constEDCS_Attribute_Value *b_ptr (notes)
);

Definition

When comparing:

integers, floats: normal mathematical rules apply

EEs, EVs: underlying compare functions for those codes apply

boolean to boolean: FALSE is less than TRUE

string to string: strcmp() rules apply

boolean to anything but a boolean: FALSE is 0, TRUE is 1, and a numeric comparison is used

string to anything but a string: the string is 0, and a numeric comparison is used


Returns

-1 if *a_ptr < *b_ptr
0 if *a_ptr == *b_ptr
1 if *a_ptr > *b_ptr


Parameters Notes


a_ptr

 pointer to 1st EDCS_Attribute_Value to be compared

b_ptr

 pointer to 2nd EDCS_Attribute_Value to be compared


Prev: SE_CloneURN. Next: SE_CompareCharacters. Up:Index.

Last updated: July 16, 2004 Copyright © 2004 SEDRIS