![]() ![]() Express Yourself 7 years ago I'm confused. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. NeatNit First Week Joined in the very first week of SmileBASIC Source Website Expert Programmer Programming no longer gives me any trouble. ![]() snail_ Power User QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements 7 years ago The key issue with this library is it's required use of IFs, which the switch statements were intended to replace. You could fix this with VAR TOSWITCH$, in the SWITCH procedures use UNSHIFT, in the CASE functions, instead of TRIGGERED% use LEN(TOSWITCH$)>0, instead of TOSWITCH$ use TOSWITCH$, and in ENDSW use SHIFT. Express Yourself 7 years ago It would be called SELECT CASE, since that's what it is in qbasic.ĮNDSELECT SquareFingers 7 years ago SWITCHes cannot be nested. 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Website 6 years ago I use the ON command a lot, it works similarly and is good for my purpose. RaichuBender Avatar Taboo I didn't change my avatar for 180 days Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Block I didn't change my avatar for 30 days. Programming Strength 5 years ago Why was this removed? This would be very useful in my programs. If you are testing an integer or decimal, use this format:Ĩ Comment(s) HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. If you are testing a string, use this format: The first step is to load PRG:SWITCHFN into a program slot not in use. ![]() Instead of writing tons of IF statements comparing your variable each time, a switch statement does the majority of the work for you! All Rating 5 votes Description Were you one of many who were upset that SmileBASIC did not come with a switch/case-like command? I have a solution! My program! Instructions Switch/case statements are used in languages like C where you have one variable with many possible values, and you want to do something different for each value (e. ![]() What's going on? See: Site Update March 2022 SWITCH/CASE Library SubmittedĬomputablee Public Key REMOVED Min. Sign In Sign In Register *Usernames are case-sensitive Sign In Cancel ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |