switch case question

Started by
9 comments, last by HeyHoHey 16 years, 11 months ago
Quote:Original post by Trillian
Quote:Original post by HeyHoHey
OH OKAY TY TRILLIAN AND TY PAIDLINE for your last two posts. your explanation cleared a LOT up in my head lol and your example paidline reinforced it. just one more question if i wanted to have something happen if its == 8 would i just do case 8? can it go out of order can i have like case 1 case 6 case 0?


yes, you would do "case 8:", it basically means "if your variable is equal to 8 then do the following". The order of the numbers is not important, as long as you have no duplicates (do not have two "case 5" for exemple).


okay thank you so much trillian i think i decently grasp this concept now. :). im about to go try and make a basic program to try and use switch case.


thanks again
hey

This topic is closed to new replies.

Advertisement