File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices / generic_vectors_io.adb (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:23 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.
|
package body Generic_Vectors_io is
use Ring_io;
procedure get ( v : in out Vector ) is
begin
get(Standard_Input,v);
end get;
procedure get ( file : in file_type; v : in out Vector ) is
begin
for i in v'range loop
get(file,v(i));
end loop;
end get;
procedure get ( n : in natural; v : out Link_to_Vector ) is
begin
get(Standard_Input,n,v);
end get;
procedure get ( file : in file_type; n : in natural;
v : out Link_to_Vector ) is
vv : Vector(1..n);
begin
for i in vv'range loop
get(file,vv(i));
end loop;
v := new Vector'(vv);
end get;
procedure put ( v : in Vector ) is
begin
put(Standard_Output,v);
end put;
procedure put ( file : in file_type; v : in Vector ) is
begin
for i in v'range loop
put(file,' '); put(file,v(i));
end loop;
end put;
procedure put ( v : in Link_to_Vector ) is
begin
put(Standard_Output,v);
end put;
procedure put ( file : in file_type; v : in Link_to_Vector ) is
begin
if v /= null
then put(file,v.all);
end if;
end put;
procedure put_line ( v : in Vector ) is
begin
put_line(Standard_Output,v);
end put_line;
procedure put_line ( file : in file_type; v : in Vector ) is
begin
for i in v'range loop
put(file,v(i)); new_line(file);
end loop;
end put_line;
procedure put_line ( v : in Link_to_Vector ) is
begin
put_line(Standard_Output,v);
end put_line;
procedure put_line ( file : in file_type; v : in Link_to_Vector ) is
begin
if v /= null
then put_line(file,v.all);
end if;
end put_line;
procedure put ( v : in Vector; dp : in natural ) is
begin
put(Standard_Output,v,dp);
end put;
procedure put ( file : in file_type; v : in Vector; dp : in natural ) is
begin
for i in v'range loop
put(file,' '); put(file,v(i),dp);
end loop;
end put;
procedure put ( v : in Link_to_Vector; dp : in natural ) is
begin
put(Standard_Output,v,dp);
end put;
procedure put ( file : in file_type;
v : in Link_to_Vector; dp : in natural ) is
begin
if v /= null
then put(file,v.all,dp);
end if;
end put;
procedure put_line ( v : in Vector; dp : in natural ) is
begin
put_line(Standard_Output,v,dp);
end put_line;
procedure put_line ( file : in file_type; v : in Vector; dp : in natural ) is
begin
for i in v'range loop
put(file,v(i),dp); new_line(file);
end loop;
end put_line;
procedure put_line ( v : in Link_to_Vector; dp : in natural ) is
begin
put_line(Standard_Output,v,dp);
end put_line;
procedure put_line ( file : in file_type;
v : in Link_to_Vector; dp : in natural ) is
begin
if v /= null
then put_line(file,v.all,dp);
end if;
end put_line;
end Generic_Vectors_io;