It's generally not a bug, rather some kind of (syntax) problem occuring in such case.
There are 3 examples showing that:
1
Code: Select all
; Example 1, compiler doesn't see any problem and #CONST_1 is matching in Select
EnableExplicit
#CONST_1 = 3
#CONST_2 = 4
Define A = #CONST_1
Select A
Case #CONST_1: #CONST_2:
Debug A
Default
Debug "NO MATCH"
EndSelect
Code: Select all
; Example 2, compiler doesn't see any problem, but #CONST_2 is never matching in Select
EnableExplicit
#CONST_1 = 3
#CONST_2 = 4
Define A = #CONST_2
Select A
Case #CONST_1: #CONST_2:
Debug A
Default
Debug "NO MATCH"
EndSelect
Code: Select all
; Finally example 3, here compiler tells "duplicate label" on second Select statement, which points to a source of problem
EnableExplicit
#CONST_1 = 3
#CONST_2 = 4
Define A = #CONST_2
;1
Select A
Case #CONST_1: #CONST_2:
Debug A
Default
Debug "NO MATCH"
EndSelect
;2
Select A
Case #CONST_1: #CONST_2:
Debug A
Default
Debug "NO MATCH"
EndSelect