Doing an ELSE CASE within a CASE
Posted: Wed Jul 21, 2004 4:42 pm
In UV BASIC the case syntax is:
BEGIN CASE
CASE expression
statements
[CASE expression
statements
.
.
.
]
END CASE
In a psuedocode sense I want to have an ELSE after my CASE's and before the END CASE.
What is the best way to approach this. At the moment I'm working on a routine and want to pass an error message to Ans I fail to get a match on my case comparisons. I thought maybe I could set Ans to my error message before my CASE, but there are other places afterwards I want to have error handling, so I'd still need a way to know I didn't have a case match and to exit the routine there with my error message.
Probably easy, but it's been a long day.
Thanks,
BEGIN CASE
CASE expression
statements
[CASE expression
statements
.
.
.
]
END CASE
In a psuedocode sense I want to have an ELSE after my CASE's and before the END CASE.
What is the best way to approach this. At the moment I'm working on a routine and want to pass an error message to Ans I fail to get a match on my case comparisons. I thought maybe I could set Ans to my error message before my CASE, but there are other places afterwards I want to have error handling, so I'd still need a way to know I didn't have a case match and to exit the routine there with my error message.
Probably easy, but it's been a long day.
Thanks,