Developer Documentation Library > Scripting > UNICOM Intelligence Function Library > Miscellaneous functions > IsSet
 
IsSet
Returns True if an integer value matches a specified mask.
Syntax
IsSet(Val, Mask)
Parameters
Val
Type: Long
Data value to test.
Mask
Type: Long
Pattern of bits to check.
(return)
Type: Boolean
Whether all the bits set in Mask are set in Val.
Remarks
If Mask is zero (no bits set), the return value is True. If the current data value is NULL, Val is 0 and the return value is False.
This function is equivalent to the expression:
BitAnd(Val, Mask) = Mask
Example
The following example selects only records where Respondent.Serial is an odd number.
SELECT * FROM vdata
WHERE Respondent.Serial.IsSet(1)
See also
BitAnd
Miscellaneous functions