Raised This Month: $ Target: $400
 0% 

==, >, <, !=, what else?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-16-2020 , 07:26   Re: ==, >, <, !=, what else?
Reply With Quote #1

Using ranges with "switch" is also possible:

Code:
switch(cLevel) {     case 0 .. 9: // levels 1 to 10     case 10 .. 20: // levels 10 to 20     case 21 .. 29: // levels 21 to 29     case 30: // level 30     default: // everything else not included here (likely above 30) }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 06-16-2020 , 08:03   Re: ==, >, <, !=, what else?
Reply With Quote #2

Quote:
Originally Posted by OciXCrom View Post
Using ranges with "switch" is also possible:

Code:
switch(cLevel) {     case 0 .. 9: // levels 1 to 10     case 10 .. 20: // levels 10 to 20     case 21 .. 29: // levels 21 to 29     case 30: // level 30     default: // everything else not included here (likely above 30) }
👌
alferd is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode