1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 01:50:25 +00:00

Makes sure only vars and arrays are added

This commit is contained in:
Fellippe Heitor 2021-07-16 02:26:14 -03:00
parent e95e8a4825
commit df56b030f1

View file

@ -18355,27 +18355,29 @@ FUNCTION findid& (n2$)
id = ids(i)
t = id.t
IF t = 0 THEN
t = id.arraytype
IF t AND ISUDT THEN
manageVariableList "", scope$ + "ARRAY_UDT_" + RTRIM$(id.n), 1
ELSE
n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + "ARRAY" + n$ + "_" + RTRIM$(id.n), 2
IF id.subfunc = 0 THEN
IF t = 0 THEN
t = id.arraytype
IF t AND ISUDT THEN
manageVariableList "", scope$ + "ARRAY_UDT_" + RTRIM$(id.n), 1
ELSE
manageVariableList "", scope$ + "ARRAY_" + n$ + "_" + RTRIM$(id.n), 3
n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + "ARRAY" + n$ + "_" + RTRIM$(id.n), 2
ELSE
manageVariableList "", scope$ + "ARRAY_" + n$ + "_" + RTRIM$(id.n), 3
END IF
END IF
END IF
ELSE
IF t AND ISUDT THEN
manageVariableList "", scope$ + "UDT_" + RTRIM$(id.n), 4
ELSE
n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + MID$(n$, 2) + "_" + RTRIM$(id.n), 5
IF t AND ISUDT THEN
manageVariableList "", scope$ + "UDT_" + RTRIM$(id.n), 4
ELSE
manageVariableList "", scope$ + n$ + "_" + RTRIM$(id.n), 6
n$ = id2shorttypename$
IF LEFT$(n$, 1) = "_" THEN
manageVariableList "", scope$ + MID$(n$, 2) + "_" + RTRIM$(id.n), 5
ELSE
manageVariableList "", scope$ + n$ + "_" + RTRIM$(id.n), 6
END IF
END IF
END IF
END IF