I am picking up a VB6 project. My experience is limited to PHP/Python.
The following code is confusing me. Everything is evaluating to be true and the ItmRun variable is changed to 49.57 and then 55.52 when stepping through with the following variables:
ItmRun = 10.00
gType = "BBB "
gSeries = " 12"
gPDim = ""
gStep = "B2 "
Even though the fed variables should not evaluate to true for any of these statements, I end up with 55.52 at the end. Can someone point out what's wrong?
VB6 syntax is completely foreign to me. Are spaces and tabs at the start of the line, or unusual line endings/returns, the culprit here?
The following code is confusing me. Everything is evaluating to be true and the ItmRun variable is changed to 49.57 and then 55.52 when stepping through with the following variables:
ItmRun = 10.00
gType = "BBB "
gSeries = " 12"
gPDim = ""
gStep = "B2 "
Code:
If Trim(gType) = "VVV" And (Trim(gSeries) = 18 Or Trim(gSeries) = 25) And gPDim < 0.062 And Trim(gStep) = "B2" Then
ItmRun = 49.57
End If
If Trim(gType) = "VVV" And (Trim(gSeries) = 18 Or Trim(gSeries) = 25) And gPDim < 0.062 And Trim(gStep) = "G2" Then
ItmRun = 55.52
End If
Even though the fed variables should not evaluate to true for any of these statements, I end up with 55.52 at the end. Can someone point out what's wrong?
VB6 syntax is completely foreign to me. Are spaces and tabs at the start of the line, or unusual line endings/returns, the culprit here?