forums

TNT Basic Forums > Feedback
Switch Statements
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-12-2002 19:59

Posted by:
Toxicgonzo

Find more posts by Toxicgonzo

Some time in the future, TNT Basic needs a Switch Statement to replace long if/else if statements.

For example,

Switch (number)
case 1: print "option 1 choosen"
break
caes 2: print "option 2 choosen"
break
case 3: print "option 3 choosen"
break

Rather than

If number = 1
print "option 1 choosen"
else if number = 2
print "option 2 choosen"
else if number = 3
print "option 3 choosen"
end if

10-13-2002 17:55

Posted by:
Mark Tully

Find more posts by Mark Tully

Switch statements

Yeah we could do with them, I'll add it to the todo list.

Thanks,

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.