From a08d90bd6587c21f0da6b62a8fd8558fc449c476 Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Wed, 10 Feb 2021 18:18:41 -0300 Subject: [PATCH 1/2] Fixes CONST names not maintaining case in STRING * const DIM variable AS STRING * const would have CONST always turn capitals or camel case. --- source/qb64.bas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/qb64.bas b/source/qb64.bas index 2323fda7a..64e0dd3ec 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -7138,6 +7138,7 @@ DO IF UCASE$(n$) <> "AS" THEN 'traditional dim syntax for SHARED + newSharedSyntax = 0 s$ = removesymbol(n$) IF Error_Happened THEN GOTO errmes l2$ = s$ 'either symbol or nothing @@ -7738,6 +7739,7 @@ DO IF e$ <> "AS" THEN 'no "AS", so this is the traditional dim syntax dimnext: + newDimSyntax = 0 notype = 0 listarray = 0 @@ -8259,7 +8261,7 @@ DO commonarraylisted: - IF LEN(appendtype$) AND newDimSyntax = -1 THEN + IF LEN(appendtype$) > 0 AND newDimSyntax = -1 THEN IF LEN(dim2typepassback$) THEN appendtype$ = sp + SCase$("As") + sp + dim2typepassback$ IF newDimSyntaxTypePassBack = 0 THEN newDimSyntaxTypePassBack = -1 @@ -8273,7 +8275,7 @@ DO l$ = l$ + sp2 + getelements$(tlayout$, 2, n2) END IF - IF LEN(appendtype$) AND newDimSyntax = 0 THEN + IF LEN(appendtype$) > 0 AND newDimSyntax = 0 THEN IF LEN(dim2typepassback$) THEN appendtype$ = sp + SCase$("As") + sp + dim2typepassback$ l$ = l$ + appendtype$ END IF @@ -14048,6 +14050,7 @@ FUNCTION dim2 (varname$, typ2$, method, elements$) END IF IF v&& < 1 OR v&& > 9999999999 THEN Give_Error "STRING * out-of-range constant": EXIT FUNCTION bytes = v&& + dim2typepassback$ = SCase$("String * ") + constcname(i2) GOTO constantlenstr END IF From ccb9c2f74f4fe0ad3472c01c88c08cb9bd3e7a22 Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Wed, 10 Feb 2021 20:16:44 -0300 Subject: [PATCH 2/2] Fine tunes status bar links. --- source/ide/ide_methods.bas | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 6da3af6a2..3a2980e89 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -1318,11 +1318,11 @@ FUNCTION ide2 (ignore) END IF END IF - IF mY = idewy + idesubwindow AND mX >= idewx - 22 - LEN(versionStringStatus$) AND mX < idewx - 22 THEN + IF mY = idewy + idesubwindow AND mX >= idewx - 21 - LEN(versionStringStatus$) AND mX < idewx - 21 THEN 'Highlight Version Number IF VersionInfoHover = 0 THEN COLOR 13, 6 - _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ + _PRINTSTRING (idewx - 21 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ updateHover = -1 VersionInfoHover = -1 END IF @@ -1332,7 +1332,7 @@ FUNCTION ide2 (ignore) 'Restore "Find" bg VersionInfoHover = 0 COLOR 2, 3 - _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ + _PRINTSTRING (idewx - 21 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ updateHover = -1 END IF END IF @@ -8576,6 +8576,7 @@ SUB ideshowtext LSET b$ = c$ END IF lineNumberStatus$ = a$ + ":" + b$ + '_PRINTSTRING (idewx - 21, idewy + idesubwindow), CHR$(179) _PRINTSTRING (idewx - 20, idewy + idesubwindow), lineNumberStatus$ SCREEN , , 0, 0: LOCATE idecy - idesy + 3, maxLineNumberLength + idecx - idesx + 2: SCREEN , , 3, 0 @@ -14347,12 +14348,14 @@ SUB UpdateIdeInfo COLOR 0, 3 _PRINTSTRING (2, idewy + idesubwindow), a$ - COLOR 2, 3 IF LEN(versionStringStatus$) = 0 THEN - versionStringStatus$ = "v" + Version$ + versionStringStatus$ = " v" + Version$ IF LEN(AutoBuildMsg$) THEN versionStringStatus$ = versionStringStatus$ + MID$(AutoBuildMsg$, _INSTRREV(AutoBuildMsg$, " ")) + versionStringStatus$ = versionStringStatus$ + " " END IF - _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ + '_PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), CHR$(179) + COLOR 2, 3 + _PRINTSTRING (idewx - 21 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ PCOPY 3, 0 END SUB