if() {
}
or
if()
{
}
if() {
}
or
if()
{
}
Other urls found in this thread:
google.github.io
nim-lang.org
twitter.com
if(){
;}
if(condition) {
statement;
}
if(!...) goto CONT;
[code inside if]
CONT:
if
(
/* condition */
)
{
/* code */
}
else
{
/* some other code */
}
this
second one is infinitely more readable. I fucking hate that the first one is more popular.
Depends.
For one line statements:
If (condition) *some code* else *more code*
For more than one line:
If (condition) {
*some indented code*
} else {
*more indented code you lazy fuck*
}
if
(
/*condition*/
/*goes*/
/*here*/
) { /* code goes here */ } else if ( /* condition goes here */ ) { /* code goes here */ } else if ( /* condition goes here */ ) { /* code goes here */
}
Nice clearly the better option. They also collect everything about you so I guess that's the correct choice too. Jow Forums BTFO
if:
elif:
else:
t. reddit spacer
(cond [(condition) (statement)] ...)
>Python
if you think this
{
kill yourself please
}
Depends on my mood, and how it feels around its surrounding code.
When an if is too important and has a bunch of lines inside it, then I do it like this, for readability.
...
if(something_important())
{
dothis();
andthis();
...
}
...
When an if is just a minor thing,(like a quick check or something) and it's just in the middle of other things, and it's not that important then
...
randomCode();
if(!fileExists(file)){
log("shit");
return false;
}
...
if ()
condition
if(reddit) {
//pajeet trying to hide java bloat by condensing lines
}
if(!reddit)
{
}
depends on the language or your project spec.
if (condition) {
// code goes here
}
based and redpilled
if (condition)
{
// code goes here
}
cringe, probably likes to wear women's clothes.
Option 1 but no braces if the statement is only one line.
i used to do this, but is better the leave the brackets in cases you need to debug.
Based, 17pbp
I feel like
if(){
}
Is easier to read.
Stupid frogposter
Don't do this. It's harder to read and gets messy with multiple if-else inside each other.
top one. the bottom one uses needless lines