in reply to variable set to 0 ? 0 : 1
Why do programmers try to do their job with as few brackets as possible? I would much rather write that as
To show that we arereturn ( ( $status == 0 ) ? 0 : 1 );
To put that into English, this returns 0 if the status value is 0; for all other values of status, it returns 1. So you could paraphrase this as "Did the routine return a non-zero status?"
--t. alex
but my friends call me T.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: variable set to 0 ? 0 : 1
by sauoq (Abbot) on Sep 07, 2002 at 01:26 UTC | |
by talexb (Chancellor) on Sep 07, 2002 at 04:33 UTC | |
by Flexx (Pilgrim) on Sep 07, 2002 at 12:21 UTC | |
by talexb (Chancellor) on Sep 07, 2002 at 22:34 UTC | |
by blakem (Monsignor) on Sep 07, 2002 at 23:45 UTC | |
| |
by jdporter (Paladin) on Nov 05, 2002 at 15:39 UTC |