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.
The variable is only assigned a value. It is not used. You can remove the declaration with the assignments and the program behavior will not change. The warning is correct.