I have setup a dialogue box with two radio buttons and allocated B1 as a variable for it, having a value of either 0 or 1 depending on the choice of radio button.
I then use Select Case to examine the value of B1 and find that Case 0 and Case 1 doesn't work, but Case False and Case True does. My code is:
B1=1
Call SUDDefLoad(AutoDrvUser&"Actions.sud")
Call SUDDlgShow("Analysis")
if DlgState = "IDOk" then
Select Case B1
Case False
Call ScriptStart("GetData")
Case True
Call ScriptStart("GetContData")
End Select
else
Flag = 0
Call Err.Raise (-1) 'Autoquit
end if
A similar dialogue box written by a colleague uses the same concept for the radio buttons and variable, but his code works because he uses an If statement to determine the value of B1. His code is:
B1=0
Call SUDDlgShow("Decimate")
if DlgState <> "IDOk" then
Call Err.Raise (-1) 'Autoquit
end if
If B1=0 Then
NoPts = Val(T1)
Else
NoPts = L2/Val(T1)
End If
Why the difference in behaviour with the use of B1?
Thanks,
Simon.