[BACK]Return to mainroco.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Main

File: [local] / OpenXM_contrib / PHC / Ada / Main / mainroco.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:23 2000 UTC (23 years, 6 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 text_io,integer_io;                 use text_io,integer_io;
with Communications_with_User;           use Communications_with_User;
with Numbers_io;                         use Numbers_io;
with Standard_Complex_Poly_Systems;      use Standard_Complex_Poly_Systems;
with Standard_Complex_Poly_Systems_io;   use Standard_Complex_Poly_Systems_io;
with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
with Standard_Complex_Solutions_io;      use Standard_Complex_Solutions_io;
with Driver_for_Root_Counts;
with Bye_Bye_Message;

procedure mainroco ( infilename,outfilename : in string ) is
 
  n : natural;
  inft,outft : file_type;
  lp : Link_to_Poly_Sys;

  procedure Read_System ( filename : in string ) is

    file : file_type;

  begin
    if filename /= ""
     then Open(file,in_file,filename);
          get(file,n);
          lp := new Poly_Sys(1..n);
          get(file,n,lp.all);
          Close(file);
    end if;
  exception
    when others =>
      new_line;
      put("Could not open file with name "); put_line(filename);
      lp := null; return;
  end Read_System;

begin
  Read_System(infilename);
  if lp = null
   then new_line; get(lp); new_line;
  end if;
  Create_Output_File(outft,outfilename);
  put(outft,lp.all);
  declare
    q : Poly_Sys(lp'range);
    qsols : Solution_List;
    rc : natural;
  begin
    Driver_for_Root_Counts(outft,lp.all,q,false,qsols,rc);
  end; 
  new_line(outft);
  put(outft,Bye_Bye_Message);
  Close(outft);
end mainroco;