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

Shorthand if()?

Name: Anonymous 2008-05-06 4:39

sup /prog/,

I was wondering whether any of you would use in lieu of

if(cond)
 do_something();


the equivalent

cond && do_something();

or something like this for a function that returns 0 on error:

(s=get_foo()) || fprintf(stderr,"Error getting foo\n");


of course, multiline if-statements would be a bad idea with this, but how about if statements with a single body statement?

Name: Anonymous 2011-02-27 11:13



>
>
> Okay

Name: Anonymous 2011-02-27 11:14








Okay

Name: Anonymous 2011-02-27 11:14


Test

Name: Anonymous 2011-02-27 11:15

:GJS1M 67dcbdbce4a0b67c4b48e86a6ae29205a95e4b83024a9d947213d1231800e8d9
:48 748c7c773bc63341711e734e49dab7ff
:1210062420 1298823288

>>17
<-- check my doubles

Name: Anonymous 2011-02-27 11:15



Test

Name: Anonymous 2011-02-27 11:21

> > > > > Test

Name: Anonymous 2011-02-27 11:21

> > > > Test

Name: Anonymous 2011-02-27 11:22

Test
Test
Test
Test

Name: Anonymous 2011-02-27 11:22

Test
Test
Test
Test

Name: Anonymous 2011-02-27 11:23

Test
Test
Test
Test

Name: Anonymous 2011-02-27 11:24

Test> > > Test> > > Test> > > Test

Name: Anonymous 2011-02-27 11:25

Test > > > Test > > > Test > > > Test

Name: Anonymous 2011-02-27 11:42

> > > > > > > > > > >  
Oh my.

Name: Anonymous 2011-02-27 12:25

Test </span>

Name: Anonymous 2011-02-27 12:25

:GJS1M 67dcbdbce4a0b67c4b48e86a6ae29205a95e4b83024a9d947213d1231800e8d9
:48 f4ba707282cb2a7da2b0fb566f05b26e
:1210062420 1298827536

>>25
<-- check my doubles

Name: Anonymous 2011-02-27 12:30

Name: Anonymous 2011-02-27 12:34

Test

Name: Anonymous 2011-02-27 12:36


Test!

Name: Anonymous 2011-02-27 12:37

Try2

Name: Anonymous 2011-02-27 12:48

Test

Name: Anonymous 2011-02-27 12:51

Test
Test

Name: Anonymous 2011-02-27 12:52

Test

Name: Anonymous 2011-02-27 13:06

The thingAbout
These quotes

Name: Anonymous 2011-02-27 13:07

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:34

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:34

:GJS1M 67dcbdbce4a0b67c4b48e86a6ae29205a95e4b83024a9d947213d1231800e8d9
:48 03afdcc6134cf2bd3734500dca6c3c0d
:1210062420 1298831645

>>28
<-- check my doubles

Name: Anonymous 2011-02-27 13:35

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:40

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:42

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:44

The thing
About
These quotes

Name: Anonymous 2011-02-27 13:44

The thing
About
These quotes

Name: Anonymous 2011-02-27 14:05

1
2
3



Name: Anonymous 2011-02-27 14:32

1
2
3

Name: Anonymous 2011-02-27 14:36

1
2
3

Name: Anonymous 2011-02-27 14:40

1
2
3

Name: Anonymous 2011-02-27 15:50

1
2

3

Name: Anonymous 2011-02-27 15:51

:GJS1M 67dcbdbce4a0b67c4b48e86a6ae29205a95e4b83024a9d947213d1231800e8d9
:66 2a03a48087b1fc79c033c5868dfb074b
:1210062420 1298839863

>>73
<-- that's cool and all, but check 'em

Name: Anonymous 2011-02-27 15:53

Understanding
the damn
line-break.

Name: Anonymous 2011-02-27 15:55

Damn
this
line-break.

Name: Anonymous 2011-02-27 16:01

123
4
5
6

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