Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case & If Statements 2

Status
Not open for further replies.

wuzzle

Programmer
Dec 20, 2000
75
0
0
CA
Can there be a "case" statement within an "if" statement?
 
Ok, so if I was setting up my comments before I write my code, would this be right?:


Enter series of movie numbers
Check status of MoviesEntered

Calculate LateCharge

If None
MsgBox (“Accept a payment or charge on the customer’s account.”)

Begin Case
Case Payment
Call CashierModule

Case Charge
UserOwes + LateCharge
End Case

Else
MsgBox (“There were no charges. Click to exit the program.”)

End If

Quit
 
Ok, so if I was setting up my comments before I write my code, would this be right?:


Enter series of movie numbers
Check status of MoviesEntered

Calculate LateCharge

If None
MsgBox (“Accept a payment or charge on the customer’s account.”)

Begin Case
Case Payment
Call CashierModule

Case Charge
UserOwes + LateCharge
End Case

Else
MsgBox (“There were no charges. Click to exit the program.”)

End If

Quit
 
LateCharge

If None
MsgBox (“Accept a payment or charge on the customer’s account.”)

Select Case '*** Be sure Its Select Case
Case Payment
Call CashierModule

Case Charge
UserOwes + LateCharge
End Select '*** Be sure its end Select***

Else
MsgBox (“There were no charges. Click to exit the program.”)

End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top