Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Errors

Branch condition must be a Boolean expression

Scroll Prev Up Next More

This compiler error will occur if the expression that follows an if reserved word is not a Boolean expression.

 

The examples below would cause this error to occur:

if n_TokenDate // integer, not Boolean
endif
 
if EvalToken(n_TokenDate, '[m]') // string, not Boolean
endif

The expression following if may be complex, provided its result is Boolean.For example:

if MonthOf(n_TokenDate) == 1
 sRESULT = 'January'
endif

In this example, sRESULT is set to 'January' when the month of the token date is January.

 


Topic 109017, last updated on 16-Oct-2026