Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Operators

Sets and Membership Operators

Scroll Prev Up Next More

The membership operator in tests whether a string or integer expression matches one of the values in square brackets []. It returns true when there is a match, and false otherwise.

bIsWeekendName = sDayName in ['Saturday','Sunday']
bIs31DaysMonth = MonthOf(nDate) in [1,3,5,7,8,10,12]

When dealing with integers, you can use one or more ranges (ranges are not defined for string nor boolean data types):

bIsTeenager = nAge in [13..19]
bIsWorldWarYear = nYear in [1914..1918, 1939..1945]

String membership compares complete values and is case-sensitive. For example, 'Sunday' in ['Saturday','Sunday'] is true, whereas 'Sun' in ['Saturday','Sunday'] and 'sunday' in ['Saturday','Sunday'] are false.

 


Topic 121500, last updated on 16-Oct-2026