Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ writing style

Name: vexed 2012-03-25 19:54

When writing code (in C++ particularly), where do you put your curly braces?

ex:
int main()
{

}

OR...

int main(){

}

which do you think is better? clearer? more professional?

Name: Anonymous 2012-03-26 14:35

return_type
function(
    arg1,
    arg2,
    arg3,
)
int arg1;
double arg2;
void *arg3;
{
    if(
        style != this
    )
    {
        style = shit;
    }
}

Name: Anonymous 2012-03-26 15:25

I raged quite a bit reading a lot of those.

That's interesting to notice, how you can come to like or dislike fucking writing styles.

I enjoy K&R style but I use GNU style.

Name: Anonymous 2012-03-26 18:38

>>25
Sorry, this thread is about C++ (that's in the title at least), I was thinkng of C. In C, a struct declared within a struct doesn't have inner scope, but the same scope as the outer struct. Curly braces most often mean ``statement list'', except for variable and array initializations, unions/structs and (some say) function bodies. Statement lists introduce a lexical scope for variable and other names. Structs and unions don't.

Opening bracket for function bodies should be in column 0 so you can jump from function to function with [.

Name: Anonymous 2012-03-27 13:13

if (CheckDubs) {
    Print("Dubz check em'");
} else {
    Print(FindNextDubs(" nice dubs bro."));
}

Name: Anonymous 2012-03-27 14:24

>>44
Nice dubz and style, broh

Name: Anonymous 2012-03-27 15:33

>>43
Statement lists don't always introduce a lexical scope. I'll correct your other idiotic assertions later on today.

Name: Anonymous 2012-03-27 15:35

>>46
This applies to both C and C++.

Name: Anonymous 2012-03-27 15:44

>>46
lol fag you just got trolloled

Name: Anonymous 2012-03-27 15:46

>>46
Statement lists don't always introduce a lexical scope.
Be that as it may. The curly braces of struct/union declarations never do.

Name: Anonymous 2012-03-27 16:22

[code]
#define PROCEDURE void
#define MAIN main
#define BEGIN {
#define END }

PROCEDURE MAIN
BEGIN
    // hurrrrr
END

Name: Anonymous 2012-03-27 17:03

Somone's a a mental midget.

Name: Anonymous 2012-03-27 17:16

>>51
Impressive grammar you've got there.

Name: Anonymous 2012-03-27 17:28

>>52
Your awesome display of technical incompetence is just as impressive.

Name: Anonymous 2012-03-27 17:52

>>51
>>53
Reported, called the cops, sent multiple letters to FBI, NSA and CIA, phoned interpol and europol and lit my house on fire so the cops would come and here my report about you in person.

Hope you enjoy that ass rape in jail kodak-kun

Name: Anonymous 2012-03-27 19:27

>>36
if this is what i have to expect in future jobs im going to kill myself

>>50
is this real life

Name: Anonymous 2012-03-27 21:18

#include "ltd.h" bool main(*&){if(IsOpGay()) return Sahgeh(); else return CheckForDubs();}
bool IsOpGay(void){return true;} bool Sahgeh(void){return true;} bool CheckForDubs(){return temp char* &x;}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List