BEGIN CASE
CASE X=10
GOSUB ABC10
CASE X=20
GOSUB ABC20
etc...
END CASE
GlenB
Not sure what you're aiming to avoid, but how about the obvious:-
for x = 10 to 50 step 10
begin case
case x = 10
crt "It"
case x = 20
crt "was"
case x = 30
crt "a"
case x = 40
crt "success,"
case x = 50
crt "Gordon"
end case
next x
stop
--
Ashley Chapman
I replied to your original direct email but it sounds like it never reached
you.
Another way to do this is to use the ON GOSUB statement. Which of the
various solutions offered is best will depend entirely on how this example
relates to what the real program needs to do.
program test_gosub
for x = 10 to 50 step 10
on x/10 gosub 10, 20, 30, 40, 50
next x
stop
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200