From: Eric B. <er...@go...> - 2008-02-07 14:40:57
|
CRISMER Paul-Georges wrote: > Recursive? Oops, indeed. I didn't realize that we were talking about `zero' from MA_DECIMAL_CONSTANTS and not from MA_DECIMAL. This implementation looks twisted to me though. I would have written in class MA_DECIMAL_CONSTANTS: zero: MA_DECIMAL is -- Neutral element for "+" and "-" once create Result.make_zero ensure zero_not_void: Result /= Void is_zero: Result.is_zero end and in MA_DECIMAL: zero: like Current is -- Neutral element for "+" and "-" do Result := decimal.zero ensure then is_zero: Result.is_zero end and no need for `once_zero'. Or did I miss something again? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |