-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Parker writes:
>On Tue, Mar 02, 2004 at 10:35:29AM -0500, Theo Van Dinter wrote:
>> On Tue, Mar 02, 2004 at 12:13:44AM -0800, Dan Quinlan wrote:
>> > I think we need to discuss this one on the mailing list.
>> > 
>> > > theo: in the SA code, do you think we should be doing return code of 0
>> > >       is error, or 0 is ok?
>> > > theo: I'm finding some of our code does one and some does the other.
>> > > theo: we should pick one.
>> > > ***theo picks 0 means error
>
>Well, I'd say 0 is false.  What false means as a return value is up to
>the caller.
>
>> Ok, but I picked 0 means error and 1 means ok as is standard in most
>> perl modules and the rest of our code.  Lets this type of thing work:
>> 
>> $value = do_a() || do_b() || do_c();

+1 on "1 means OK, 0/undef means error".   IMO, undef is more appropriate
and perlish.

The *only* place we should consider "0 means OK" is in calls to exit().

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFAROGuQTcbUG5Y7woRAjmpAKC5rRh6cyWY9kFiXSoIZnEeN5B7wwCeLHDr
dhk6Rh89H90jGIVCsxjOp1U=
=PuES
-----END PGP SIGNATURE-----

Reply via email to