![]() ![]() | ![]() |
File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / standard_integer_numbers.adb (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:26 2000 UTC (23 years, 10 months ago) by maekawa
Import the second public release of PHCpack. OKed by Jan Verschelde. |
package body Standard_Integer_Numbers is function Create ( n : natural ) return integer is begin return integer(n); end Create; function Equal ( a,b : integer ) return boolean is begin return (a = b); end Equal; procedure Copy ( a : in integer; b : in out integer ) is begin b := a; end Copy; procedure Add ( a : in out integer; b : in integer ) is begin a := a+b; end Add; procedure Sub ( a : in out integer; b : in integer ) is begin a := a-b; end Sub; procedure Min ( a : in out integer ) is begin a := -a; end Min; procedure Mul ( a : in out integer; b : in integer ) is begin a := a*b; end Mul; function Rmd ( a,b : integer ) return integer is begin return a mod b; end Rmd; procedure Rmd ( a : in out integer; b : in integer ) is begin a := a mod b; end Rmd; procedure Div ( a : in out integer; b : in integer ) is begin a := a/b; end Div; procedure Div ( a,b : in integer; q : out integer; r : out integer ) is begin q := a/b; r := a mod b; end Div; procedure Div ( a : in out integer; b : in integer; r : out integer ) is begin r := a mod b; a := a/b; end Div; procedure Clear ( a : in out integer ) is begin null; end Clear; end Standard_Integer_Numbers;