Bug? Variable Not Used Bug

JohnC

Well-Known Member
Licensed User
In an Activity_Create I have this declaration:

B4X:
Dim DT As Int
And later in this same sub I have this code that uses the DT variable:

B4X:
Select Case Blacktop.CommJob.JobAction

        Case Blacktop.ActionTypes.Hot_Patching, _
           Blacktop.ActionTypes.PW_Seal, _
           Blacktop.ActionTypes.PW_Touch_Up, _
           Blacktop.ActionTypes.Collect

            Select Case Blacktop.CommJob.JobAction
                Case Blacktop.ActionTypes.Two_Day_Job,Blacktop.ActionTypes.Three_Day_Job
                    Select Case Blacktop.CommJob.JobAction
                        Case Blacktop.ActionTypes.Four_Day_Job
                            DT = 4
                        Case Blacktop.ActionTypes.Three_Day_Job
                            DT = 3
                        Case Else
                            DT = 2
                    End Select
But yet the IDE reports a "Unused Variable 'DT' (warning #9)" for the declaration line at the top.
 
Top