Class Module
37 Members
Comparisons Class
Entisoft Tools 2.0 Object Library · Comparisons · 34 Functions · 0 Properties · 2 Subroutines
Declarations
Declarations
Functions that compare values (of possibly different types) and functions that classify values. Copyright 1998 Entisoft
Section
CanBeBoolean
Can Be Boolean
Determine if the argument can be converted to a Boolean value.
Function
CanBeByte
Can Be Byte
Determine if the argument can be converted to a Byte value.
Function
CanBeCurrency
Can Be Currency
Determine if the argument can be converted to a Currency value.
Function
CanBeDate
Can Be Date
Determine if the argument can be converted to a Date value.
Function
CanBeDecimal
Can Be Decimal
Determine if the argument can be converted to a Decimal value.
Function
CanBeDouble
Can Be Double
Determine if the argument can be converted to a Double (precision floating-point numeric) value.
Function
CanBeInteger
Can Be Integer
Determine if the argument can be converted to an Integer value.
Function
CanBeLong
Can Be Long
Determine if the argument can be converted to a Long (Integer) value.
Function
CanBeSingle
Can Be Single
Determine if the argument can be converted to a Single (precision floating-point numeric) value.
Function
CompareCoerceDataType
Compare Coerce Data Type
Compare two values to determine if one is less than, equal to, or greater than the other. Attempts to fix-up different types of values to compatible data types.
Function
CompareExactDataType
Compare Exact Data Type
Compare two values to determine if one is less than, equal to, or greater than the other. Considers the values of all Visual Basic data types to be distinct so that, for example, a Single value of 34.5! would not equal a Double value of 34.5#.
Function
CompareLikeDataType
Compare Like Data Type
Compare two values to determine if one is less than, equal to, or greater than the other. Compares values with similar data types, but never considers strings equal to numbers.
Function
CompareLikeDataTypeFast
Compare Like Data Type Fast
Compare two values to determine if one is less than, equal to, or greater than the other. Compares values with similar data types, but never considers strings equal to numbers. Faster version of the CompareLikeDataType function which has more-restrictive argument types.
Function
EqualCoerceDataType
Equal Coerce Data Type
Return True if the values vOne and vTwo equal each other, otherwise return False. Attempts to fix-up different types of values to compatible data types.
Function
EqualExactDataType
Equal Exact Data Type
Return True if the values vOne and vTwo equal each other, otherwise return False. Considers the values of all Visual Basic data types to be distinct so that, for example, a Single value of 34.5! would not equal a Double value of 34.5#.
Function
EqualLikeDataType
Equal Like Data Type
Return True if the values vOne and vTwo equal each other, otherwise return False. Compares values with similar data types, but never considers strings equal to numbers.
Function
EqualLikeDataTypeFast
Equal Like Data Type Fast
Return True if the values vOne and vTwo equal each other, otherwise return False. Compares values with similar data types, but never considers strings equal to numbers. Faster version of the EqualLikeDataType function which has more-restrictive argument types.
Function
IsBetween
Is Between
Return True if vCheck is between vLow and vHigh inclusive. Attempts to fix-up different types of values to compatible data types.
Function
IsFalse
Is False
Return True if the argument vValue is "False".
Function
IsFloatingPointDataType
Is Floating Point Data Type
Return True if the data type of the argument is capable of representing floating-point numeric values. Function returns False otherwise. More specifically, it considers the following data types to be floating-point numeric: Currency, Date, Decimal, Double, and Single.
Function
IsNumber
Is Number
Return True if the data type of the argument is numeric. Function returns False otherwise. More specifically, it considers the following data types numeric: Boolean, Byte, Currency, Date, Double, Integer, Long, and Single.
Function
IsOff
Is Off
Return True if the argument vValue is "Off".
Function
IsOn
Is On
Return True if the argument vValue is "On".
Function
IsTrue
Is True
Return True if the argument vValue is "True".
Function
IsWholeDataType
Is Whole Data Type
Return True if the data type of the argument is limited to representing whole numbers. Function returns False otherwise. More specifically, it considers the following data types to be limited to representing whole numbers: Boolean, Byte, Integer, and Long.
Function
LikeAnyPattern
Like Any Pattern
Return True if any of the LIKE patterns in string vPatterns match the string vSearch.
Function
LikePattern
Like Pattern
Return True if any of the LIKE pattern in string vPattern matches the string vSearch.
Function
Max2
Max 2
" Maximum of Two Values" Return the maximum of two arguments. Returns the argument on the left (vOne) if arguments are equal.
Function
Min2
Min 2
" Minimum of Two Values" Return the minimum of two arguments. Returns the argument on the left (vOne) if arguments are equal.
Function
StrCompCustom
Str Comp Custom
"String Compare Custom" Like the Visual Basic StrComp function, except that it uses a custom sort order/collating sequence. Compare two string values to determine if one is less than, equal to, or greater than the other.
Function
VarTypeFromString
Var Type From String
"Variable Type From String" or "String To Variable Type" Converts the name of a data type into the VarType value representing that data type.
Function
VarTypeToLength
Var Type To Length
Returns the number of bytes occupied by variables whose VarType is vVarType.
Function
VarTypeToString
Var Type To String
"Variable Type To String" Converts a numeric value returned by the Visual Basic VarType function into a string which names the data type.
Function
VT
VT
"Value Type" Return the name of the data type of the argument.
Function
Max2EqualFast
Max 2 Equal Fast
" Maximum Equal (Fast)" or "Assign Maximum (Fast)" Assign the leftmost argument rOne to the maximum value of the two arguments. Shorthand for rOne = Max(rOne, vTwo)
Sub
Min2EqualFast
Min 2 Equal Fast
" Minimum Equal (Fast)" or "Assign Minimum (Fast)" Assign the leftmost argument rOne to the minimum value of the two arguments. Shorthand for rOne = Min(rOne, vTwo)
Sub