PropertyHandle :: Compare - Compare the values for two property handles
The function compares the values of the two property handles. The function cannot compare collections.
The function returns -1 when the the value for the property handle is lower than the value for the passed property handle. The function returns 1 when the the value for the property handle is higher than the value for the passed property handle. The function returns 0 if the values are equal.
The function returns ERIC (-99) if the values are not comparable, i.e. no instance selected for the property or invalid property handle.
The result of a comparison is an integer value with the following meaning:
0 - both operands have the same value
1 - the calling operand is greater than the passed operand
-1 - the calling operand is smaller than the passed operand
Implementation overview
- Compare with date value
PropertyHandle :: Compare ( date_val ) - Compare with double value
PropertyHandle :: Compare ( double_val ) - Compare with 32-bit integer value
PropertyHandle :: Compare ( long_val ) - Compare with other property handle
PropertyHandle :: Compare ( cprop_hdl, case_opt_w=NO ) - Compare with string value
PropertyHandle :: Compare ( cnstring, case_opt_w=NO ) - Compare with time value
PropertyHandle :: Compare ( time_val ) - - internal feature (not documented)
PropertyHandle :: Compare ( fldptr, case_opt_w=NO ) - - internal feature (not documented)
PropertyHandle :: Compare ( cstring, case_opt_w=NO )
Implementation details
-
Compare with date value
int16 PropertyHandle  :: Compare ( dbdt date_val )
This implementation compares the value in the property handle with the passed date value. Data conversion is performed for the passed value when required. Converting date values to string values may result in different string values for the same date value depending on the national setting. Hence, string values should not be compared with date values. In this case it is more appropriate to compare the date values directly ( ph . GetDate () == date_val ).
- date_val
- Date value
The data value is passed in the internal data format.
to list
- date_val
- Date value
-
Compare with double value
int16 PropertyHandle  :: Compare ( double double_val )
This implementation compares the value in the property handle with the passed double float value. Data conversion is performed for the passed value when required.
- double_val
- Double value
A double value is a 64 bit floating number.
to list
- double_val
- Double value
-
Compare with 32-bit integer value
int16 PropertyHandle  :: Compare ( int32 long_val )
This implementation compares the value in the property handle with the passed integer value. Data conversion is performed for the passed value when required.
- long_val
- Integer value
The value is passed as platform independent 32-bit integer value.
to list
- long_val
- Integer value
-
Compare with other property handle
int16 PropertyHandle  :: Compare ( PropertyHandle &cprop_hdl, logical case_opt_w=NO )
This implementation compares the value in the property handle with the value in the passed property handle. Data conversion is performed when required.
- cprop_hdl - Property Handle
- case_opt_w
- - internal feature (not documented)
Default: NO
to list
-
Compare with string value
int16 PropertyHandle  :: Compare ( NString &cnstring, logical case_opt_w=NO )
This implementation compares the value in the property handle with the value in the passed string. Data conversion is performed for the string when required.
- cnstring - String containing the text
- case_opt_w
- - internal feature (not documented)
Default: NO
to list
-
Compare with time value
int16 PropertyHandle  :: Compare ( dbtm time_val )
This implementation compares the value in the property handle with the passed time value. Data conversion is performed for the passed value when required. Converting time values to string values may result in different string values for the same time value depending on the national setting. Hence, string values should not be compared with time values. In this case it is more appropriate to compare the time values directly ( ph.GetTime () == time_val ).
- time_val
- Time value
The time value is passed in the internal data format.
to list
- time_val
- Time value
-
- internal feature (not documented)
int16 PropertyHandle  :: Compare ( fld *fldptr, logical case_opt_w=NO )
- fldptr - - internal feature (not documented)
- case_opt_w
- - internal feature (not documented)
Default: NO
to list
-
- internal feature (not documented)
int16 PropertyHandle  :: Compare ( char *cstring, logical case_opt_w=NO )
- cstring
- C string
Usually, the string has to be 0-terminated, but there might be exceptions.
- case_opt_w
- - internal feature (not documented)
Default: NO
to list
- cstring
- C string