This compiler error will occur if the expression that follows a while reserved word is not a boolean expression. The examples below would cause this error to occur:
while n_TokenDate // integer !!!
endwhile
while EvalToken(n_TokenDate, 'm') // string !!!
endwhile
Note, however, that what follows the reserved word while can be a complex expression, as long as its result is boolean.
nCurDate = n_TokenDate
while EvalToken(nCurDate,'[m]') == '1'
inc(nCurDate)
endwhile
In the above example, the loop runs until the evaluation of the token [m] on that date no longer translates into the string '1' (ie. it is no longer in January).
Topic 109016, last updated on 18-Apr-2020