Yes:St_W wrote:The compiler warning disappeared with the latest build (#371 win32) - thank you, dkl - , but the problem mentioned by fxm seems to be not fixed yet
- AndAlso & OrElse return a boolean only if the two operands are boolean literals.
- If one operand at least is a boolean variable, the return is always an integer (whatever the second operand).
Compiled with 'fbc_win32_mingw_0371_2015-09-14.zip':
Code: Select all
Dim As Boolean A = false, B = true
Print false Orelse true
Print false Orelse B '' NOK
Print A Orelse true '' NOK
Print A Orelse B '' NOK
Sleep
Code: Select all
true
-1
-1
-1