I need this program to look at the if then statments multiple times. As you can see the program calls up a proc
then needs to go back to the top of the if then statements only this time around carrying a different value for the variable it already checked so that it doesn't check it twice and proceeds on to the next else statement. How can
this be written to accomplish this. Thanks....Woodro
proc main
integer event
integer CDP=0
integer FCAS=0
integer FSNS=0
integer NCTL=0
integer Var1=0
;==================================
;DIALOG BOXES GATHERING INFORMATION 2
;==================================
dialogbox 0 167 77 376 136 3 "GATHERINIG ESN INFORMATION.........."
text 1 5 2 98 11 "LD-87 Selections:" left
checkbox 3 5 13 41 11 "CDP" CDP
checkbox 4 5 27 41 11 "FCAS" FCAS
checkbox 5 5 39 41 11 "FSNS" FSNS
checkbox 6 5 52 41 11 "NCTL" NCTL
pushbutton 45 257 104 40 13 "CANCEL" CANCEL
pushbutton 46 305 104 40 13 "OK" OK DEFAULT
enddialog
while 1
dlgevent 0 event
switch event
case 0 ;No event occurred.
endcase
case 3
case 4
case 5
case 6
endcase
default
exitwhile
endcase
endswitch
endwhile
dlgdestroy 0 cancel
;testing values of esn gate openers
;==============================================
usermsg "CDP=%d" CDP
usermsg "FCAS=%d" FCAS
usermsg "FSNS=%d" FSNS
usermsg "NCTL=%d" NCTL
;==============================================
setjmp 0 Var1
if cdp==1
call cdpproc
elseif FCAS==1
call fcasproc
elseif FSNS==1
call fsnsproc
elseif NCTL==1
call nctlproc
else
usermsg "Go to other program"
endif
usermsg "This will start the next ESN Choices"
endproc
proc cdpproc
integer Var1 = 0
;if Var1=1
usermsg "CDP program will now run"
cdp = 0
;else
longjmp 0 Var1
;endif
endproc
proc fcasproc
usermsg "FCAS program will now run"
endproc
proc fsnsproc
usermsg "FSNS program will run"
endproc
proc nctlproc
usermsg "NCTL program will run"
endproc
Woodro
then needs to go back to the top of the if then statements only this time around carrying a different value for the variable it already checked so that it doesn't check it twice and proceeds on to the next else statement. How can
this be written to accomplish this. Thanks....Woodro
proc main
integer event
integer CDP=0
integer FCAS=0
integer FSNS=0
integer NCTL=0
integer Var1=0
;==================================
;DIALOG BOXES GATHERING INFORMATION 2
;==================================
dialogbox 0 167 77 376 136 3 "GATHERINIG ESN INFORMATION.........."
text 1 5 2 98 11 "LD-87 Selections:" left
checkbox 3 5 13 41 11 "CDP" CDP
checkbox 4 5 27 41 11 "FCAS" FCAS
checkbox 5 5 39 41 11 "FSNS" FSNS
checkbox 6 5 52 41 11 "NCTL" NCTL
pushbutton 45 257 104 40 13 "CANCEL" CANCEL
pushbutton 46 305 104 40 13 "OK" OK DEFAULT
enddialog
while 1
dlgevent 0 event
switch event
case 0 ;No event occurred.
endcase
case 3
case 4
case 5
case 6
endcase
default
exitwhile
endcase
endswitch
endwhile
dlgdestroy 0 cancel
;testing values of esn gate openers
;==============================================
usermsg "CDP=%d" CDP
usermsg "FCAS=%d" FCAS
usermsg "FSNS=%d" FSNS
usermsg "NCTL=%d" NCTL
;==============================================
setjmp 0 Var1
if cdp==1
call cdpproc
elseif FCAS==1
call fcasproc
elseif FSNS==1
call fsnsproc
elseif NCTL==1
call nctlproc
else
usermsg "Go to other program"
endif
usermsg "This will start the next ESN Choices"
endproc
proc cdpproc
integer Var1 = 0
;if Var1=1
usermsg "CDP program will now run"
cdp = 0
;else
longjmp 0 Var1
;endif
endproc
proc fcasproc
usermsg "FCAS program will now run"
endproc
proc fsnsproc
usermsg "FSNS program will run"
endproc
proc nctlproc
usermsg "NCTL program will run"
endproc
Woodro