[BACK]Return to PolyCalc.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath

Diff for /OpenXM/src/OpenMath/PolyCalc.java between version 1.9 and 1.13

version 1.9, 2000/03/16 12:28:42 version 1.13, 2005/07/17 02:48:21
Line 1 
Line 1 
 /**  /**
  * $OpenXM: OpenXM/src/OpenMath/PolyCalc.java,v 1.8 2000/01/28 06:22:01 tam Exp $   * $OpenXM: OpenXM/src/OpenMath/PolyCalc.java,v 1.12 2000/10/11 09:34:06 ohara Exp $
  */   */
   
 import JP.ac.kobe_u.math.tam.OpenXM.*;  /*
      How to try.
       ox -ox ox_sm1
       java PolyCalc
       Input two polynomials in x and y  and Press the grobner base button.
       Actions for other buttons have not yet been implemented.
    */
   
   import ORG.openxm.tam.*;
 import java.applet.*;  import java.applet.*;
 import java.awt.event.*;  import java.awt.event.*;
 import java.awt.*;  import java.awt.*;
Line 119  class PolyCalc extends Applet implements ActionListene
Line 127  class PolyCalc extends Applet implements ActionListene
   public void run(){ // for debug    public void run(){ // for debug
     try{      try{
       while(true){        while(true){
         CMO tmp;          OXmessage tmp = oxm.receive();
   
           textarea.append("=> "+ tmp.getBody() +"\n");
         Thread.yield();          Thread.yield();
   
         switch(oxm.receiveOXtag()){  
         case OpenXM.OX_COMMAND:  
           oxm.receiveSM();  
           break;  
   
         case OpenXM.OX_DATA:  
           tmp = oxm.receiveCMO();  
           textarea.append("=> "+ tmp +"\n");  
           break;  
         }  
       }        }
     }catch(java.io.IOException e){}      }catch(java.io.IOException e){}
   }    }
Line 180  class PolyCalc extends Applet implements ActionListene
Line 178  class PolyCalc extends Applet implements ActionListene
         */          */
       oxm = new OpenXM(host,ControlPort,DataPort);        oxm = new OpenXM(host,ControlPort,DataPort);
       textarea.append("Connected.\n");        textarea.append("Connected.\n");
       oxm.send(new CMO_STRING("(cohom.sm1) run ;\n"));        oxm.send(new CMO_STRING("[(parse) (cohom.sm1) pushfile] extension ;\n"));
       oxm.send(new SM(SM.SM_executeStringByLocalParser));        oxm.send(new SM(SM.SM_executeStringByLocalParser));
   
       thread = new Thread(this);        thread = new Thread(this);
Line 194  class PolyCalc extends Applet implements ActionListene
Line 192  class PolyCalc extends Applet implements ActionListene
   
   private void debug(String str){    private void debug(String str){
     if(debug){      if(debug){
       System.out.println(str);        System.err.println(str);
     }      }
   }    }
   
Line 221  class PolyCalc extends Applet implements ActionListene
Line 219  class PolyCalc extends Applet implements ActionListene
   
     for(int i=0;i<argv.length;i++){      for(int i=0;i<argv.length;i++){
       if(argv[i].equals("-h")){        if(argv[i].equals("-h")){
         System.out.print(usage());          System.err.print(usage());
         System.exit(0);          System.exit(0);
       }else if(argv[i].equals("-debug")){        }else if(argv[i].equals("-debug")){
         //debug = true;          //debug = true;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>