[BACK]Return to object.kk CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097

Diff for /OpenXM/src/k097/object.kk between version 1.1 and 1.4

version 1.1, 1999/10/08 02:12:15 version 1.4, 2001/01/08 05:26:49
Line 1 
Line 1 
   /* $OpenXM: OpenXM/src/k097/object.kk,v 1.3 2001/01/05 11:14:25 takayama Exp $ */
 /* object.kk , 1997, 4/11. */  /* object.kk , 1997, 4/11. */
 Protect("showln",0);  Protect("showln",0);
   
Line 21  def IsObject(a) {
Line 22  def IsObject(a) {
   if (k00ecTag(a[0]) == k00ecTag(Object[0])) return(true);    if (k00ecTag(a[0]) == k00ecTag(Object[0])) return(true);
   else return(false);    else return(false);
 }  }
 HelpAdd(["IsObject",["IsObject(a) return true if a is an Object."]]);  HelpAdd(["IsObject",
    ["IsObject(<<a>>) return true if a is an Object."],
    ["a"],
    ["Tag"],
    "check if a given object is primitive or not."
   ]);
   
   
   
Line 59  HelpAdd(["Gmp.",
Line 65  HelpAdd(["Gmp.",
  ["Gmp is a class which supports the following methods:",   ["Gmp is a class which supports the following methods:",
   "BitAnd, BitOr, ModuloPower, ProbabilisticPrimeP, Sqrt,",    "BitAnd, BitOr, ModuloPower, ProbabilisticPrimeP, Sqrt,",
   "Gcd, Div, Mod.",    "Gcd, Div, Mod.",
   "Ex.  r = Gmp.Gcd(5,8); ",    "These methods call functions of GNU MP package.",
   "These methods call functions of Gnu-MP package.",    "Note that there is no method to create an instance.",
   "The Copyright notice is in kan96xx/gmp.",    "Ex.  r = Gmp.Gcd(5,8); "
   "Note that there is no method to create an instance."]]);    ],
     null,
     null,
     "class Gmp"
   ]);
   
   class Stderr extends Object {
     def Print(s) {
        s = ToString(s);
        if (!Boundp("Stderr_fd")) {
           sm1(" [37 (string) dc (stderr)] cat (w) file /Stderr_fd set ");
        }
        sm1(" Stderr_fd s writestring ");
     }
     def Println(s) {
        Print(s); Ln();
     }
     def Ln() {
        if (!Boundp("Stderr_fd")) {
           sm1(" [37 (string) dc (stderr)] cat (w) file /Stderr_fd set ");
        }
        sm1(" Stderr_fd 10 (string) dc writestring ");
     }
     def Flush() {
        sm1(" [(flush)] extension ");
     }
   }
   
   HelpAdd(["Stderr.",
    ["Stderr is a class which supports printing to stderr.",
     "Methods are Print, Println, Ln, Flush.",
     "Stderr_fd is a global variable to save a file descriptor."
     ],
     null,
     null,
     "class Stderr"
   ]);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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