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

Pages: 1-

What's your style?

Name: Anonymous 2009-06-28 11:17


 for(i = 0; i < 10; i++) {
     if(i % 2 == 0) {
         doSomething(i); }
     else {
         doSomethingElse(i); } }


or


if (x < 0) {
  printf("Negative");
  negative(x);
} else {
  printf("Positive");
  positive(x);
}

Name: FrozenVoid 2009-06-28 11:23

printf("%s",x<0?"Negative":"Positive");x<0?negative(x):positive(x);




_______________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-28 11:27

printf((x<0)?"Negative":"Positive");

Name: FrozenVoid 2009-06-28 11:29

for(i=0;i<5;i++){doSomething(2*i); doSomethingElse((2*i)+1);}




________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: FrozenVoid 2009-06-28 11:30

>>3 That can accomplished as puts(x<0?"Negative":"Positive") since you can extend this string anyway.



____________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-28 13:20

>>3
woah parenthesis abuse

Name: Anonymous 2009-06-28 14:03

>>6
It's easier to read. Who cares if you use more than the necessary parenthesis? Also the question was on how you indent, and open and close scopes.

Name: Anonymous 2009-06-28 14:04

for(i = 0; i < 10; i++)
  i % 2 ? doSomethingElse(i) : doSomething(i);

-funroll-loops

(x < 0 ? printf("Negative"), negative : (printf("Positive"), positive))(x);

Name: Anonymous 2009-06-28 14:32

for(i <- 0.until(10,2)
{
  doSomething(i)
  doSomethingElse(i+1)
}

and

x match
case y if y < 0 => println("Negative");  negative(y)
case z => println("Positive");  positive(z)

Name: Anonymous 2009-06-28 17:25

zipWithM_ ($) (cycle [doSomething, doSomethingElse]) [0..9]

Name: Anonymous 2009-06-28 17:31


case x < 0 of
    True -> putStr "Negative" >> negative x
    _    -> putStr "Positive" >> positive x


and


sequence [ if i%2 == 0 doSomething i else doSomethingElse i
    | i <- [0..9] ]

Name: Anonymous 2009-06-28 17:32

Also,

if x < 0 then putStr "Negative" >> negative x
         else putStr "Not negative" >> notNegative x

Name: Anonymous 2009-06-28 18:52

for(i = 0; i < 10; i++) {
  if(i % 2 == 0) {
    doSomething(i);
  } else {
    doSomethingElse(i);
  }
}

if (x < 0) {
  printf("Negative");
  negative(x);
} else {
  printf("Positive");
  positive(x);
}

Name: Anonymous 2009-06-28 19:00

Name: Anonymous 2009-06-28 21:33

for(i = 0; i < 10; i++) {
  if(i % 2 == 0) {
    doSomething(i);
  }
  else {
    doSomethingElse(i);
  }
}

if (x < 0) {
  printf("Negative");
  negative(x);
}
else {
  printf("Positive");
  positive(x);
}

Name: Anonymous 2009-06-28 21:36

Name: Anonymous 2009-06-28 22:15


if(x < 0)
     {
          printf("Negative");
          negative(x);
     }
else
     {
          printf("Positive");
          positive(x);
     }

Name: crazyass 2009-06-28 22:25

...

Name: Anonymous 2009-06-29 0:52

int
main
              (
 int     argc,
 char  **argv
)
                    {
 const char *s;
 s = "Hello world!";
 printf("%s", s);
 return 0;
}

Name: Anonymous 2009-06-29 1:05

Name: Anonymous 2009-06-29 1:40

Name: FrozenVoid 2009-06-29 2:51

http://dis.4chan.org/read/prog/1243170860/60 <<-- Amazing how retarded indentation can get.
int main(int argc,char **argv){const char *s;s="Hello world!";printf("%s",s);return 0;}
^The above is concise and easy to read.

___________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: FrozenVoid 2009-06-29 3:02

The above program is just :void main(void){puts("Hello world!");}



________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-29 7:22

>>22
It's easy to read except it isn't? God I hope IHBT.
>>23
No it is not. It's an entirely different program in almost every aspect.

Name: Anonymous 2009-06-29 8:16

That guy is a genius.

int
              is_inset
                 (
    const             char
  *           s              )
       {                while
(   *s    
                   )  {
 if       (    !(               ( *s
    >=        'a'   
                      &&
                           *s
    <=           'z'               )
 ||          (          *s
        >=
               '0'
                       &&
  *s                           <=
          '9'       )))
      return
                        0     ;
    ++s          ;         }
           return        1
                   ;
}

Name: Anonymous 2009-06-29 8:58

Xarndentation is the only True Style.

http://cairnarvon.rotahall.org/misc/bezier.c.html

Name: Anonymous 2009-06-29 9:16

>>24
YHBT, and YMBNH

for(i = 0; i < 10; i++) {
    if (i % 2 == 0) {
        doSomething(i);
    }
    else {
        doSomethingElse(i);
    }
}

if (x < 0) {
    printf("Negative");
    negative(x);
}
else {
    printf("Positive");
    positive(x);
}

Name: Anonymous 2009-06-29 9:18

>>27
}[br]else {
I hope everyone you love dies painfully.

Name: Anonymous 2009-06-29 9:19

>>28
}
else {

Name: Anonymous 2009-06-29 9:24


#define /= !=

int main()
{
  int
  *
  GRUNNUR
  ;
  *GRUNNUR = 42;
  if(*GRUNNUR /= 21)
  {
    printf("The pleasure of being cummed inside!\n");
  }
  else
  {
    printf("NO THANK YOU\n");
  }
}

Name: Anonymous 2009-06-29 9:36

>>25
That guy is a genius.
Thank you :)

But I'm kind of ashamed of >>25; that indentation conveys no meaning, and I didn't even try to form the symbols into something like a face.

Name: Anonymous 2009-06-29 11:04

#!/usr/bin/python
x =raw_input()

if (x == 1):
    print "one"
else:
    print "not one"

Name: Anonymous 2009-07-12 6:19

moron have moron to sup You have /search?q=heyska This fuck though.  about is is is ÞÛ     ÞÛ   was the you AirBook? heard new was Have tail $ cat  touch cat kill   of the that  basic posted, of is now wash wash on and and advancing   doesn't filesystem encoding? much type much, I following keep mind that keep of editors: guys basic NO help    basics   Java     Java

Name: Anonymous 2010-12-22 7:48

Name: Anonymous 2011-02-04 13:01


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