-

  • (102)
  • web- (38)
  • (22)
  • (14)
  • (13)
  • (11)
  • (3)
  • (3)

 - e-mail

 

 -

   community_coding

 -

 LiveInternet.ru:
: 29.12.2004
:
:
: 536

:


Coding Style ( )

, 25 2005 . 03:24 +
Djuffin .
( )
. ( .)
.
- , .

C++:
0 ?
code:

if (ptr == NULL)
if (ptr == 0)
if (ptr)
if (0 == ptr)
if (NULL == ptr)


.
if (ptr) - , ptr - .
if (0 == ptr), if (NULL == ptr) - , .
NULL, ptr , 0, .

. - .

, ,
.
Djuffin



: [1] []
   , 25 2005 . 04:00 ()
- :)
Occam's Razor - if (ptr). " ptr - " - :) - , - ? :) ?

: if (!ptr) if (ptr) ;) :)
   
Wincy   , 25 2005 . 16:19 ()
...
   
Wolverrum   , 26 2005 . 22:35 ()
if ( !!ptr ) :)

( ).
if ( ptr == NULL ) , , ( )
   
Djuffin   , 28 2005 . 00:27 ()
Wolverrum, . .



, test eax,eax! .
   
: [1] []
 

:
: 

: ( )

:

  URL