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

File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Supports / generic_lists_of_vectors_io.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:27 2000 UTC (23 years, 8 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_Lists_of_Vectors_io is

  use Vectors,Vectors_io;

  procedure get ( n,m : in natural; l : out List ) is
  begin
    get(Standard_Input,n,m,l);
  end get;

  procedure get ( file : in file_type; n,m : in natural; l : out List ) is

    res,res_last : List;

  begin
    for i in 1..m loop
      declare
	v : Link_to_Vector;
      begin
        get(file,n,v);
        Append(res,res_last,v);
      end;
    end loop;
    l := res;
  end get;

  procedure put ( l : in List ) is
  begin
    put(Standard_Output,l);
  end put;

  procedure put ( file : in file_type; l : in List ) is

    tmp : List := l;

  begin
    while not Is_Null(tmp) loop
      put(file,Head_Of(tmp)); new_line(file);
      tmp := Tail_Of(tmp);
    end loop;
  end put;

end Generic_Lists_of_Vectors_io;