From: CRISMER Paul-G. <Pau...@gr...> - 2008-02-07 13:00:08
|
Hello Berend, {MA_DECIMAL}.make_zero creates one object whose value is zero. That way, 1 million of objects whose value is zero. {MA_DECIMAL_CONSTANTS}.zero refers to a single object whose value is zero. You can have as many references to {MA_DECIMAL}.zero or {MA_DECIMAL_CONSTANTS}.zero, they refer all to a unique object whose value is zero. In {MA_DECIMAL_CONSTANTS}.zero, you have to create a {MA_DECIMAL} instance (line 1:) before being able to call the {MA_DECIMAL}.zero feature (line 2:). Since this object is just a "proxy" to be able to call the {MA_DECIMAL}.zero feature, I chose to write line 1: which creates a decimal object with 1 significant digit. Does this make sense to you? Best regards, Paul G. Crismer zero: MA_DECIMAL is -- Neutral element for "+" and "-" once 1: create Result.make (1) 2: Result := Result.zero ensure zero_not_void: Result /= Void end ***** Disclaimer ***** http://www.groupes.be/1_mail-disclaimer.htm |