1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-26 17:10:38 +00:00

Clears most recent value of variables when out of scope.

This commit is contained in:
FellippeHeitor 2021-08-01 12:08:16 -03:00
parent f1eb6787a9
commit 16841c56f1

View file

@ -7792,6 +7792,13 @@ FUNCTION idevariablewatchbox(currentScope$)
totalVisibleVariables = 0
FOR x = 1 TO totalVariablesCreated
IF usedVariableList(x).includedLine THEN _CONTINUE 'don't add variables in $INCLUDEs
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
'it's ok
ELSE
usedVariableList(x).mostRecentValue = ""
END IF
IF LEN(searchTerm$) THEN
thisScope$ = usedVariableList(x).subfunc
IF thisScope$ = "" THEN thisScope$ = mainmodule$