[BACK]Return to standard_complex_numbers_io.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_complex_numbers_io.adb, Revision 1.1.1.1

1.1       maekawa     1: with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
                      2: with Standard_Floating_Numbers_io;       use Standard_Floating_Numbers_io;
                      3:
                      4: package body Standard_Complex_Numbers_io is
                      5:
                      6:   procedure get ( c : in out Complex_Number ) is
                      7:   begin
                      8:     get(Standard_Input,c);
                      9:   end get;
                     10:
                     11:   procedure get ( file : in file_type; c : in out Complex_Number ) is
                     12:
                     13:     x,y : double_float;
                     14:
                     15:   begin
                     16:     get(file,x); get(file,y);
                     17:     c := Create(x,y);
                     18:   end get;
                     19:
                     20:   procedure put ( c : in Complex_Number ) is
                     21:   begin
                     22:     put(Standard_Output,c);
                     23:   end put;
                     24:
                     25:   procedure put ( file : in file_type; c : in Complex_Number ) is
                     26:   begin
                     27:     put(file,REAL_PART(c));
                     28:     put(file,"  ");
                     29:     put(file,IMAG_PART(c));
                     30:   end put;
                     31:
                     32:   procedure put ( c : in Complex_Number; fore,aft,exp : in natural ) is
                     33:   begin
                     34:     put(Standard_Output,c,fore,aft,exp);
                     35:   end put;
                     36:
                     37:   procedure put ( file : in file_type;
                     38:                   c : in Complex_Number; fore,aft,exp : in natural ) is
                     39:   begin
                     40:     put(file,REAL_PART(c),fore,aft,exp);
                     41:     put(file,"  ");
                     42:     put(file,IMAG_PART(c),fore,aft,exp);
                     43:   end put;
                     44:
                     45:   procedure put ( c : in Complex_Number; dp : in natural ) is
                     46:   begin
                     47:     put(c,dp,dp,dp);
                     48:   end put;
                     49:
                     50:   procedure put ( file : in file_type;
                     51:                   c : in Complex_Number; dp : in natural ) is
                     52:   begin
                     53:     put(file,c,dp,dp,dp);
                     54:   end put;
                     55:
                     56: end Standard_Complex_Numbers_io;

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