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(); > In this case, caller assumes that a 0/undef/'' (ie false) return value is an error and will continue processing. > I haven't checked all of the code, since I was just doing stuff in the > Bayes section yesterday, but ... Yeah, a whole lot of that was legacy code, I have good intentions to go in and do more cleanup in this code. One day....One day Michael
