Sub JobDone (Job As JobResult)
If Job.Success Then
If Job.JobName="job1" Then
'always job.response=1 or 0
Select Job.Response
Case "0".GetBytes
Log("0")
Case "1".GetBytes
Log("1")
End Select
End If
End If
End Sub
Comparison inside select Not work:
Sub JobDone (Job As JobResult)
If Job.Success Then
If Job.JobName="job1" Then
'always job.response=1 or 0
Select Job.Response
Case "0"
Log("0")
Case "1"
Log("1")
End Select
End If
End If
End Sub
Comparison inside select Not work:
Sub JobDone (Job As JobResult)
If Job.Success Then
If Job.JobName="job1" Then
'always job.response=1 or 0
Select Job.Response
Case 0
Log("0")
Case 1
Log("1")
End Select
End If
End If
End Sub
I figured out the problem, it is SELECT statement : simply Select/Case not working in B4R, WHY? any explanation.
Working:
Sub JobDone (Job As JobResult)
If Job.Success Then
If Job.JobName="job1" Then
'always job.response=1 or 0
if Job.Response="0" Then Log("0")
if Job.Response="1" Then log("1")
End If
End If
End Sub
Not working using Select/Case:
Sub JobDone (Job As JobResult)
If Job.Success Then
If Job.JobName="job1" Then
'always job.response=1 or 0
Select Job.Response
Case "0"
Log("0")
Case "1"
Log("1")
End Select
End If
End If
End Sub