Bill,
you could always overthink it:
ALIST = '*A*'
BLIST = "*B*2*'
TEST =
'*":ANS:'*'
BEGIN CASE
CASE
INDEX(ALIST,TEST,1) ; GOSUB CHECK.A
CASE
INDEX(BLIST,TEST,1) ; GOSUB CHECK.B
END
CASE
I use the '*' delimiters so that
an illegal answer of 'B2' will fail.
--
Charles Barouch
[EMAIL PROTECTED] - Consulting
(718) 762-3884x1
Brutzman, Bill wrote:
| How can this structure be cleaned-up?
|
| begin case
| case Ans = 'A' ; gosub
Check.A
| case Ans = 'B' ; gosub Check.B
|
case Ans = '2' ; gosub Check.B
| end case
|
| The
following is more difficult to read.
|
| begin case
|
case Ans = 'A' ; gosub Check.A
| case Ans
= 'B' or Ans = '2' ; gosub Check.B
| end case
|
| I
would like something like...
|
| begin case
|
case Ans = 'A' ; gosub Check.A
| case Ans = 'B'
|
case Ans = '2' ; gosub Check.B
| end case
|
| so
that the "gosub Check.B" command is not repeated. I have tried
a few
| alternatives without a victory.
|
| Suggestions
would be appreciated.
|
| --Bill
| -------
| u2-users
mailing list
| [email protected]
| To unsubscribe
please visit http://listserver.u2ug.org/
|
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/