Annotation of OpenXM_contrib/PHC/Ada/Homotopy/mainred.adb, Revision 1.1
1.1 ! maekawa 1: with text_io,integer_io; use text_io,integer_io;
! 2: with Communications_with_User; use Communications_with_User;
! 3: with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems;
! 4: with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io;
! 5: with Drivers_for_Reduction; use Drivers_for_Reduction;
! 6:
! 7: procedure mainred ( infilename,outfilename : in string ) is
! 8:
! 9: lp : Link_to_Poly_Sys;
! 10: outfile : file_type;
! 11: d : natural;
! 12: ans : character;
! 13:
! 14: procedure Read_System ( filename : in string ) is
! 15:
! 16: file : file_type;
! 17:
! 18: begin
! 19: if filename /= ""
! 20: then Open(file,in_file,filename);
! 21: get(file,lp);
! 22: Close(file);
! 23: end if;
! 24: exception
! 25: when others =>
! 26: new_line;
! 27: put("Could not open file with name "); put_line(filename);
! 28: lp := null; return;
! 29: end Read_System;
! 30:
! 31: begin
! 32: Read_System(infilename);
! 33: if lp = null
! 34: then new_line; get(lp);
! 35: end if;
! 36: Create_Output_File(outfile,outfilename);
! 37: put(outfile,lp.all); new_line(outfile);
! 38: Driver_for_Reduction(outfile,lp.all,d,false);
! 39: Close(outfile);
! 40: new_line;
! 41: put("Do you want the reduced system on separate file ? (y/n) ");
! 42: Ask_Yes_or_No(ans);
! 43: if ans = 'y'
! 44: then
! 45: declare
! 46: redfile : file_type;
! 47: begin
! 48: put_line("Reading the name of the output file.");
! 49: Read_Name_and_Create_File(redfile);
! 50: put(redfile,lp.all);
! 51: Close(redfile);
! 52: end;
! 53: end if;
! 54: end mainred;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>