Sets ([ ]), Membership (in) and Range (..)

Navigation:  Appendices > Macro Language > Operators >

Sets ([ ]), Membership (in) and Range (..)

Previous pageReturn to chapter overviewNext page

The membership operator tests whether a string or integer expression is one of the values in the square set brackets [] :

 

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) :

 

bIsTeeenager = nAge in [13..19]

bIsWorldWarYear = nYear in [1914..1918, 1939..1945]

 

It is important to note that invisible character tokens are treated as single characters.


Topic 121500 updated on 31-Oct-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?membership.htm