Multiplicative Sequence Class Body
MC logo
 

Multiplicative Sequence Class Body

Ada Code Examples


<<Multiplicative Sequence Class Download Listing Sequence Class>>
--
-- Multiplicative counter.  Increases by a factor each time.
--
with Gnat.Io; use Gnat.Io;
with CompCount; use CompCount;
package body mulcount is

   -- Move to the next item in the sequence.
   procedure Next(S: in out MultSequence) is
   begin
      S.Val := S.Val * S.Inc;
   end Next;
end Mulcount;
<<Multiplicative Sequence Class Listing Sequence Class>>