File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / standard_complex_numbers_io.adb (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:26 2000 UTC (23 years, 10 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD Changes since 1.1: +0 -0
lines
Import the second public release of PHCpack.
OKed by Jan Verschelde.
|
with Standard_Floating_Numbers; use Standard_Floating_Numbers;
with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io;
package body Standard_Complex_Numbers_io is
procedure get ( c : in out Complex_Number ) is
begin
get(Standard_Input,c);
end get;
procedure get ( file : in file_type; c : in out Complex_Number ) is
x,y : double_float;
begin
get(file,x); get(file,y);
c := Create(x,y);
end get;
procedure put ( c : in Complex_Number ) is
begin
put(Standard_Output,c);
end put;
procedure put ( file : in file_type; c : in Complex_Number ) is
begin
put(file,REAL_PART(c));
put(file," ");
put(file,IMAG_PART(c));
end put;
procedure put ( c : in Complex_Number; fore,aft,exp : in natural ) is
begin
put(Standard_Output,c,fore,aft,exp);
end put;
procedure put ( file : in file_type;
c : in Complex_Number; fore,aft,exp : in natural ) is
begin
put(file,REAL_PART(c),fore,aft,exp);
put(file," ");
put(file,IMAG_PART(c),fore,aft,exp);
end put;
procedure put ( c : in Complex_Number; dp : in natural ) is
begin
put(c,dp,dp,dp);
end put;
procedure put ( file : in file_type;
c : in Complex_Number; dp : in natural ) is
begin
put(file,c,dp,dp,dp);
end put;
end Standard_Complex_Numbers_io;