Which one correct?

Which one correct?

Attached: out-0.png (1920x900, 22K)

Other urls found in this thread:

gnu.org/prep/standards/html_node/Formatting.html#Formatting
oracle.com/technetwork/java/javase/documentation/codeconventions-142311.html#449
twitter.com/AnonBabble

Since this is C, the left one is correct.
In a real language, the right one is correct.

why ?

Attached: thisisbait.png (625x626, 66K)

Riddle me this:
if (x)
or
if(x)

Firts one.

different languages have different conventions. You write C like the left, but Java for example you do like the right.
gnu.org/prep/standards/html_node/Formatting.html#Formatting
oracle.com/technetwork/java/javase/documentation/codeconventions-142311.html#449

just use python and get rid of those curly cunts

Attached: 1551226893221.jpg (645x1000, 92K)

a function with one statement dont need any braces

Who has the one where the guy put all the braces at the very end of each line and kept track of nesting depth with python-style tabs?

every function goes on one line
one function, one line
thats the rule

I'm a good Ctizen
int main(void)
{
printf("Hello world\n");
return 0;
}

if(you.formatCodeLikeThis())
{
kill(yourself);
}
else if(you.doThis()) kill(yourself, also);

Found the retard

#include
int main(void) { puts("Hello world"); return 0; }

if is not a function

Different projects have different conventions*
GNU C style is
static char *
concat (char *s1, char *s2)
{
while (x == y)
{
something ();
somethingelse ();
}
finalthing ();
}

Don't bother. Write the code however you want to then run it through the linter settings your company and/or client want.

yikes
you're retarded

sure, sure, but which one is correct?

left one is correct, because it is visually attractive and the start of the curly barce is the same as the end that is each get their own new line the right part is ugly, at the beginning it is on the same line as the if statement and at the end the brace gets its own new line so left

I got this function from Jow Forums
gui()
{
("${@:?}" > /dev/null 2>&1 &)
}

Been using it for ages now, quite often. Didn't understand parts of it, but thought I'd figure it out as I learned more about shell scripts. But I still haven't encountered anything similar to this.
I think I understand what the braces around the entire 3rd line do, but don't really know why they're used in this case.
I have no idea how the "${@:?}" part works, or what elements it breaks down into.
I also wish I knew the technical name for the "${@:?}" part and whatever building blocks it can be broken into, so I knew what to google as a verb.

right because that's how i do it and everyone else can go get fucked.

>yfw Dennis wrote it the first way

Attached: Dennis-Ritchie.jpg (660x480, 65K)

Follow whatever conventions are already in place. Always.

if(false){
for(int i=0;i

If you put a newline before opening braces, please, do us all a favor and hang yourself.

Attached: 42e.gif (480x270, 1.83M)

none, use puts you filthy fucks

>automatically appends newline
no thanks.

what do you use it for?

a==b