Please enable JavaScript to view this site.

 

The and operator takes 2 boolean expressions and returns true if both expressions are true and returns false if either expression is false.

bIsOver35 = (nAge >= 35)
bCanBeUSPresident = bWasBornInUS and bIsOver35

You can use the and operator in more complex expressions :

bIsLeapYearDay = (DayOf(nDate) = 29and (MonthOf(nDate) = 2)

 


Topic 122000, last updated on 18-Apr-2020