From 38e0ec37d2614399a9704f876d47503f0e566836 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sun, 15 Aug 2021 02:30:26 -0300 Subject: [PATCH] Fixes case adjustment of array names in UBOUND/LBOUND calls. FINALLY! <3 --- source/qb64.bas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/qb64.bas b/source/qb64.bas index 37724e49e..e41366bca 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -18735,6 +18735,8 @@ END FUNCTION FUNCTION fixoperationorder$ (savea$) + STATIC uboundlbound AS _BYTE + a$ = savea$ IF Debug THEN PRINT #9, "fixoperationorder:in:" + a$ @@ -18743,6 +18745,7 @@ FUNCTION fixoperationorder$ (savea$) n = numelements(a$) 'n is maintained throughout function IF fooindwel = 1 THEN 'actions to take on initial call only + uboundlbound = 0 'Quick check for duplicate binary operations uppercasea$ = UCASE$(a$) 'capitalize it once to reduce calls to ucase over and over @@ -19367,7 +19370,7 @@ FUNCTION fixoperationorder$ (savea$) IF Debug THEN PRINT #9, "found id matching " + f2$ - IF nextc = 40 THEN '( + IF nextc = 40 OR uboundlbound <> 0 THEN '( 'function or array? IF id.arraytype <> 0 OR id.subfunc = 1 THEN @@ -19379,6 +19382,7 @@ FUNCTION fixoperationorder$ (savea$) IF Error_Happened THEN EXIT FUNCTION IF id.internal_subfunc THEN f2$ = SCase$(RTRIM$(id.cn)) + s$ + uboundlbound = (UCASE$(f2$) = "UBOUND" OR UCASE$(f2$) = "LBOUND") ELSE f2$ = RTRIM$(id.cn) + s$ END IF