From 06101c0a9a65c44243d1c75c65eb1bdeed3d9caf Mon Sep 17 00:00:00 2001 From: Samuel Gomes Date: Wed, 10 Apr 2024 20:06:57 +0530 Subject: [PATCH] Modify the behavior of the _ANDALSO and _ORELSE operators to return -1 when the result is true --- source/qb64pe.bas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/qb64pe.bas b/source/qb64pe.bas index 1deedf578..94ad7475c 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -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