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

Pages: 1-

Curly braces

Name: Anonymous 2011-04-21 23:28

RITE
int main() {
    if (hurr) return durr;

    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}


RONG
int main()
{
    if (hurr)
    {
        return durr;
    }

    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}


excessive whitespace == unreadable

Name: Anonymous 2011-04-21 23:31


int
main()
{
        if (hurr) {
                return durr;
        }
        return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}

Name: Anonymous 2011-04-21 23:32

You're doing it wrong, the return statement should be on its own line if you follow the ONE TRUE BRACE STYLE. Why? It's more consistent.

http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS

Name: Anonymous 2011-04-21 23:43

>>3

Faggot. Suck my dick

Name: Anonymous 2011-04-22 0:02

The only thing that really matters is that you are consistent.

Name: Anonymous 2011-04-22 2:06

this isnt a problem in python :3c

Name: Anonymous 2011-04-22 3:18

>>1
Java "style", GNU `style'.

>>2
Braindamaged K&R.

>>3
u mena

int main(int argc, char **argv)
{
        if (hurr) {
            return durr;
        }

        return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}

Name: Anonymous 2011-04-22 4:05


int main()
{
    if (hurr)
        return durr;
    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}


Right!

Name: Anonymous 2011-04-22 4:36

The One, True Style.

int
main
 (
)
                                                       {
  if     (
     hurr
    )
              {
  return durr;
 }
 return OHGODHOWDIDTHISGETTHEREIAMNOTGOODWITHCOMPUTER;
}

Name: Anonymous 2011-04-22 5:02

>>9
Yeah, it's nice, but I don't like how you put the "int" and "main" to different lines.

Name: Anonymous 2011-04-22 6:11

int main() { return (hurr? durr : OHGODHOWDIDTHISGETTHEREIAMNOTGOODWITHCOMPUTER);}

Name: Anonymous 2011-04-22 6:25

basement nerd
int main() {
    if (hurr) {
        return durr;
    }
    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}

ENTERPRISE programmer
int main()
{
    if (hurr)
    {
        return durr;
    }
    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}

Name: Anonymous 2011-04-22 6:52

zarun no erika

Name: Anonymous 2011-04-22 7:20

>>12
Close, but it's not quite ENTERPRISE-level.
basement nerd
int main() {
    if (hurr) {
        return durr;
    }
    return OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER;
}
ENTERPRISE programmer
class MyDurrApplication
{

    public static void main(String[] args)
    {
   
        if (hurr)
        {

            System.out.println("durr!"); // Display the string.

            return; // Terminate from the main method.

        }

        System.out.println("OHGODHOWDIDTHISGETHEREIAMNOTGOODWITHCOMPUTER"); // Print an error message.

        return; // Extra redundancy to ensure we terminate the method.

    }

}

Name: Anonymous 2011-04-22 8:13

>>7

That's the Allman style, not GNU.

Beauty:

int main()
{
      if(I don't type like an idiot, sorry.) {
          return 0;
      }
      return 1;
}

Name: Anonymous 2011-04-22 14:09

>>1
"whitespace"? WTF

Name: Anonymous 2011-04-22 14:16

>>16
ONE WORD: THE FORCED INDENTATION OF CODE. THREAD OVER

Name: Anonymous 2011-04-22 14:56

>>16
Nobody here gets it, loungeman.

Name: Anonymous 2011-04-22 15:28

>>10
I was actually just trolling. Nobody should indent like this.

Name: Anonymous 2011-04-22 15:29

>>19
But you just got trolled back.

Name: Anonymous 2011-04-22 17:15

>>20
Why do I not feel trolled?

Name: Anonymous 2011-04-22 17:34

ONE TRUE STYLE TO OWN AND DOMINATE THEM ALL


int main()
{
   if(hurr) return durr;
   return derp;
}


For longer flow control statements (like for), one could move the statement after it into next line (with an extra indent), like this:

[code]for (int commonIntegerIterator = 0; commonIntegerIterator < iteratedStructure.size(); commonIntegerIterator++)
   performRequiredFunction(controlStructure, securityDatabase, exceptionHandling.getExceptionHandlingFunction(currentType));

Name: Anonymous 2011-04-22 17:36

IMPORTANT ANNOUNCEMENT: Last release of One True Standard was unfinished. Here we provide a fixed version, free of charge for both premium and regular users. We apologize for the inconvenience.

for (int commonIntegerIterator = 0; commonIntegerIterator < iteratedStructure.size(); commonIntegerIterator++)
   performRequiredFunction(controlStructure, securityDatabase, exceptionHandling.getExceptionHandlingFunction(currentType));

Name: Anonymous 2011-04-22 19:32

>>23
JAVA

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