[BACK]Return to standard_integer_numbers.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Numbers/standard_integer_numbers.adb, Revision 1.1.1.1

1.1       maekawa     1: package body Standard_Integer_Numbers is
                      2:
                      3:   function Create ( n : natural ) return integer is
                      4:   begin
                      5:     return integer(n);
                      6:   end Create;
                      7:
                      8:   function Equal ( a,b : integer ) return boolean is
                      9:   begin
                     10:     return (a = b);
                     11:   end Equal;
                     12:
                     13:   procedure Copy ( a : in integer; b : in out integer ) is
                     14:   begin
                     15:     b := a;
                     16:   end Copy;
                     17:
                     18:   procedure Add ( a : in out integer; b : in integer ) is
                     19:   begin
                     20:     a := a+b;
                     21:   end Add;
                     22:
                     23:   procedure Sub ( a : in out integer; b : in integer ) is
                     24:   begin
                     25:     a := a-b;
                     26:   end Sub;
                     27:
                     28:   procedure Min ( a : in out integer ) is
                     29:   begin
                     30:     a := -a;
                     31:   end Min;
                     32:
                     33:   procedure Mul ( a : in out integer; b : in integer ) is
                     34:   begin
                     35:     a := a*b;
                     36:   end Mul;
                     37:
                     38:   function Rmd ( a,b : integer ) return integer is
                     39:   begin
                     40:     return a mod b;
                     41:   end Rmd;
                     42:
                     43:   procedure Rmd ( a : in out integer; b : in integer ) is
                     44:   begin
                     45:     a := a mod b;
                     46:   end Rmd;
                     47:
                     48:   procedure Div ( a : in out integer; b : in integer ) is
                     49:   begin
                     50:     a := a/b;
                     51:   end Div;
                     52:
                     53:   procedure Div ( a,b : in integer; q : out integer; r : out integer ) is
                     54:   begin
                     55:     q := a/b;
                     56:     r := a mod b;
                     57:   end Div;
                     58:
                     59:   procedure Div ( a : in out integer; b : in integer; r : out integer ) is
                     60:   begin
                     61:     r := a mod b;
                     62:     a := a/b;
                     63:   end Div;
                     64:
                     65:   procedure Clear ( a : in out integer ) is
                     66:   begin
                     67:     null;
                     68:   end Clear;
                     69:
                     70: end Standard_Integer_Numbers;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>