1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-05-02 14:50:14 +00:00

Modify the behavior of the _ANDALSO and _ORELSE operators to return -1 when the result is true

This commit is contained in:
Samuel Gomes 2024-04-10 20:06:57 +05:30
parent 4e4b8149b4
commit 06101c0a9a

View file

@ -20900,8 +20900,8 @@ FUNCTION operatorusage (operator$, typ AS LONG, info$, lhs AS LONG, rhs AS LONG,
IF operator$ = "XOR" THEN info$ = "^": operatorusage = 1: EXIT FUNCTION
IF operator$ = "OR" THEN info$ = "|": operatorusage = 1: EXIT FUNCTION
IF operator$ = "AND" THEN info$ = "&": operatorusage = 1: EXIT FUNCTION
IF operator$ = "_ORELSE" OR (qb64prefix_set AND operator$ = "ORELSE") THEN info$ = "||": operatorusage = 1: EXIT FUNCTION
IF operator$ = "_ANDALSO" OR (qb64prefix_set AND operator$ = "ANDALSO") THEN info$ = "&&": operatorusage = 1: EXIT FUNCTION
IF operator$ = "_ORELSE" OR (qb64prefix_set AND operator$ = "ORELSE") THEN info$ = "||": operatorusage = 3: EXIT FUNCTION
IF operator$ = "_ANDALSO" OR (qb64prefix_set AND operator$ = "ANDALSO") THEN info$ = "&&": operatorusage = 3: EXIT FUNCTION
lhs = 7
IF operator$ = "NOT" THEN info$ = "~": operatorusage = 5: EXIT FUNCTION