Actions
Bug #959
openBoolean function results are not working on If statement.
Start date:
12/03/2022
Due date:
% Done:
0%
Estimated time:
Affected version:
Description
Example:
Function CantMoveDown
End Function(True)
// This code fails
Procedure MoveDown
Print CantMoveDown
If CantMoveDown
Say "cannot"
End If
If Not CantMoveDown
Say "can"
End If
End Procedure
/*
// This code works
Procedure MoveDown
Print CantMoveDown
If (CantMoveDown=True)
Say "cannot"
End If
If Not (CantMoveDown=True)
Say "can"
End If
End Procedure
*/
Print "Waiting..."
Do
Wait Key
MoveDown
If Upper$(Inkey$)="Q" Then Exit
Loop
End
If you comment the first procedure version, and uncomment the second, you'll find that if you explicitly check the value
of true or false, it works, but apparently the If statement does not evauluate the value of a simple boolean result properly.
This was tested using the newest source from .git as of 11/27.
Updated by Brian Flanagan about 2 years ago
Note also that Print evaluates the result properly. If is the problem.
Updated by Brian Flanagan about 2 years ago
- Priority changed from Normal to High
Actions