Raised This Month: $ Target: $400
 0% 

[Tutorial] How to PROPERLY make a self toggle command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mitchell
~lick~
Join Date: Mar 2010
Old 01-21-2014 , 11:54   Re: [Tutorial] How to PROPERLY make a toggle command
Reply With Quote #1

Quote:
Originally Posted by EasSidezz View Post
The if statement inside a single line thing just confuses me alot, so I'll stick to what I usually know
It's nice to get custom to, saves space when doing short things and could save time from copying and pasting.
These do the same thing. I like to use them in the cases of which i have to show a ON/OFF text in a print. I like having shorter code cause its easier to spot the bugs
Rant:

if(Statement)
{
Do this if true
}
else
{
Do this if false
}
is the same as:
(Statement) ? (Do this if true) : (Do this if false)

either which way is right. it just comes down to personal preferences. although it would be better if you have a lot of functions you needed to check against a bool you would use the bracket statements.
Mitchell 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 18:38.


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