Additive Sequence Class Body
MC logo
 

Additive Sequence Class Body

Ada Code Examples


<<Additive Sequence Class Download Multiplicative Sequence Class>>
--
-- Additive counter.  Increases by some added amount each time.
--
with Gnat.Io; use Gnat.Io;
with CompCount; use CompCount;
package body inccount is

   -- Move to the next item in the sequence.
   procedure Next(S: in out AdditiveSequence) is
   begin
      S.Val := S.Val + S.Inc;
   end Next;

end Inccount;
<<Additive Sequence Class Multiplicative Sequence Class>>