1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-02 23:31:21 +00:00

Display warning when $Checking:Off is used with $Debug

This commit is contained in:
FellippeHeitor 2021-09-11 18:23:31 -03:00
parent 1a92e9b318
commit 883cfcb525
2 changed files with 10 additions and 6 deletions

View file

@ -13038,7 +13038,7 @@ FUNCTION idewarningbox
FOR x = 1 TO warningListItems
IF warningLines(x) = 0 THEN
l$ = l$ + warning$(x)
IF x > 1 THEN ASC(l$, treeConnection) = 192
IF x > 1 AND treeConnection > 0 THEN ASC(l$, treeConnection) = 192
ELSE
l3$ = CHR$(16) + CHR$(2) 'dark grey
IF warningIncLines(x) > 0 THEN
@ -13052,7 +13052,7 @@ FUNCTION idewarningbox
END IF
treeConnection = LEN(l$) + 1
text$ = warning$(x)
IF LEN(text$) + 10 > dialogWidth THEN dialogWidth = LEN(text$) + 10
IF LEN(l3$ + text$) + 6 > dialogWidth THEN dialogWidth = LEN(l3$ + text$) + 6
IF LEN(text$) THEN
l$ = l$ + CHR$(195) + CHR$(196) + l3$ + ": " + text$
ELSE

View file

@ -1683,8 +1683,6 @@ DO
LOOP
InValidLine(linenumber) = 0
ColorPass:
IF LEN(wholeline$) THEN
IF UCASE$(_TRIM$(wholeline$)) = "$NOPREFIX" THEN
@ -3130,12 +3128,18 @@ DO
IF a3u$ = "$DEBUG" THEN
layout$ = SCase$("$Debug")
IF NoIDEMode THEN
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "$Debug", "$Debug features only work from the IDE"
END IF
GOTO finishednonexec
END IF
IF a3u$ = "$CHECKING:OFF" THEN
layout$ = SCase$("$Checking:Off")
NoChecks = 1
IF vWatchOn <> 0 AND NoIDEMode = 0 AND inclevel = 0 THEN
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "$Debug", "$Debug features won't work in $Checking:Off blocks"
END IF
GOTO finishednonexec
END IF
@ -8781,13 +8785,13 @@ DO
IF firstelement$ = "CHAIN" THEN
IF vWatchOn THEN
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $DEBUG MODE", "CHAIN"
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $Debug mode", "CHAIN"
END IF
END IF
IF firstelement$ = "RUN" THEN 'RUN
IF vWatchOn THEN
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $DEBUG MODE", "RUN"
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $Debug mode", "RUN"
END IF
l$ = SCase$("Run")
IF n = 1 THEN