I'm not sure if it's a bug or just obscure behaviour:
a = 1
b = 0
if MyFunction(not a) or b then print "true" : else print "false"
if (not a) or b then print "true" : else print "false"
wait key
end
function MyFunction(myVar as integer)
endfunction myVar
Here's another example. Remember that SCREEN INVALID returns 1 the first time it's called (edit in a print statement at the start if you're not sure):
if not screen invalid() or a() then print "true" else print "false"
wait key
end
function a()
endfunction 0
Compare the results with this which uses variables instead:
a = 1
b = 0
if not a or b then print "true" else print "false"
wait key
end
Er, remove the or in the function version of the code snippet and it works fine:
if not screen invalid() then print "true" else print "false"
wait key
end
What on earth is going on?