Computer Science Canada

Switches in Turing

Author:  Mr. Glib [ Tue Nov 09, 2004 7:22 pm ]
Post subject:  Switches in Turing

Has anyone used a switch similar to C's break in Turing? I know Turing has its own break command but it really isn't useful to stop a for loop and go to next iteration of the loop. Any ideas or suggestions would be helpful!

Thanks.

~Mr. Glib

Author:  wtd [ Tue Nov 09, 2004 7:33 pm ]
Post subject: 

code:
case foo of
   label 0: put "yo"
   label 1: put "oy"
end case

Author:  Mr. Glib [ Tue Nov 09, 2004 9:16 pm ]
Post subject: 

wtd wrote:
code:
case foo of
   label 0: put "yo"
   label 1: put "oy"
end case


Rolling Eyes

Author:  wtd [ Tue Nov 09, 2004 10:31 pm ]
Post subject: 

Where "foo" is an integer variable.

Author:  Mr. Glib [ Wed Nov 10, 2004 6:01 pm ]
Post subject: 

wtd wrote:
Where "foo" is an integer variable.


[chatters excitedly] Very Happy


: