1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 12:21:20 +00:00

Adds more descriptive error message for Duplicate Label

This commit is contained in:
Fellippe Heitor 2021-01-26 21:01:23 -03:00
parent c0ce8d40b5
commit 9e92d13f70

View file

@ -3257,7 +3257,7 @@ DO
s = Labels(r).Scope s = Labels(r).Scope
IF s = subfuncn OR s = -1 THEN 'same scope? IF s = subfuncn OR s = -1 THEN 'same scope?
IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
IF Labels(r).State = 1 THEN a$ = "Duplicate label": GOTO errmes IF Labels(r).State = 1 THEN a$ = "Duplicate label (" + RTRIM$(Labels(r).cn) + ")": GOTO errmes
'aquire state 0 types 'aquire state 0 types
tlayout$ = RTRIM$(Labels(r).cn) tlayout$ = RTRIM$(Labels(r).cn)
GOTO addlabaq100 GOTO addlabaq100
@ -3319,7 +3319,7 @@ DO
s = Labels(r).Scope s = Labels(r).Scope
IF s = subfuncn OR s = -1 THEN 'same scope? IF s = subfuncn OR s = -1 THEN 'same scope?
IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope IF s = -1 THEN Labels(r).Scope = subfuncn 'acquire scope
IF Labels(r).State = 1 THEN a$ = "Duplicate label": GOTO errmes IF Labels(r).State = 1 THEN a$ = "Duplicate label (" + RTRIM$(Labels(r).cn) + ")": GOTO errmes
'aquire state 0 types 'aquire state 0 types
tlayout$ = RTRIM$(Labels(r).cn) tlayout$ = RTRIM$(Labels(r).cn)
GOTO addlabaq GOTO addlabaq
@ -25366,7 +25366,7 @@ SUB free_udt_varstrings (n$, udt, file, base_offset)
element = udtenext(element) element = udtenext(element)
LOOP LOOP
END SUB END SUB
SUB initialise_array_udt_varstrings (n$, udt, base_offset, bytesperelement$, acc$) SUB initialise_array_udt_varstrings (n$, udt, base_offset, bytesperelement$, acc$)
IF NOT udtxvariable(udt) THEN EXIT SUB IF NOT udtxvariable(udt) THEN EXIT SUB
offset = base_offset offset = base_offset
@ -25420,7 +25420,7 @@ SUB copy_full_udt (dst$, src$, file, base_offset, udt)
element = udtenext(element) element = udtenext(element)
LOOP LOOP
END SUB END SUB
SUB dump_udts SUB dump_udts
f = FREEFILE f = FREEFILE
OPEN "types.txt" FOR OUTPUT AS #f OPEN "types.txt" FOR OUTPUT AS #f