rev 546 - in trunk: . pr/test

SVN User <[email protected]> Mon, 24 May 2004 23:04:22 -0400
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-05-24 23:04:19 -0400 (Mon, 24 May 2004)
New Revision: 546

Modified:
   trunk/STATUS.txt
   trunk/pr/test/meow.pr
   trunk/pr/test/mi2.pr
   trunk/pr/test/modint.pr
Log:
cleaned up test files to match new code

Modified: trunk/STATUS.txt
===================================================================
--- trunk/STATUS.txt	2004-05-24 23:26:37 UTC (rev 545)
+++ trunk/STATUS.txt	2004-05-25 03:04:19 UTC (rev 546)
@@ -2,10 +2,11 @@
 ----------------------- TO-DO (highest priority first) ------------------------
 
 --- resolve binary vs. strings vs. unicode
+--- code in binary string (all binary data in binary string?)
 
 --- allow strings to compare with symbols
 
---- Add properties methods: get_,  set_, delete_, rename protoChain
+--- Add properties methods: get_,  set_, delete_
 
 --- Auto-documenter app
 
@@ -52,8 +53,10 @@
 
 
 ----------------------- TUTORIAL TO-DO ------------------------
-
+	
+	iter_ (for loop)
 	attrs_
+	protos_
 	super
 	modules
 	Inheriting from binary objects, uninitialized objects

Modified: trunk/pr/test/meow.pr
===================================================================
--- trunk/pr/test/meow.pr	2004-05-24 23:26:37 UTC (rev 545)
+++ trunk/pr/test/meow.pr	2004-05-25 03:04:19 UTC (rev 546)
@@ -12,7 +12,7 @@
 with Mammal:
    def describe():
           print "I am a mammal."
-          ante.describe()
+          super.describe()
           self.make_noise()
    def make_noise():
      print "I make mammal noise."

Modified: trunk/pr/test/mi2.pr
===================================================================
--- trunk/pr/test/mi2.pr	2004-05-24 23:26:37 UTC (rev 545)
+++ trunk/pr/test/mi2.pr	2004-05-25 03:04:19 UTC (rev 546)
@@ -1,7 +1,7 @@
 #!/usr/bin/env prothon
 
 def refer(start, attrname):
-    mro = self.protoList()
+    mro = self.protoChain()
     n = mro.len()
     i = 0
     while i < n:
@@ -15,7 +15,7 @@
         if i == n:
             break
         o = mro[i]
-        attrs = o.attrs()
+        attrs = o.attrs_
         if attrname in attrs:
             a = attrs[attrname]
             if a.hasProto?(Func):
@@ -32,7 +32,7 @@
     def add_(other):
         if self.modulo != other.modulo:
             raise TypeError
-        proto = self.protoList()[1]
+        proto = self.protoChain()[1]
         add = refer(ModInt, 'add_')
         x =  proto(add{self}(other))
         return x

Modified: trunk/pr/test/modint.pr
===================================================================
--- trunk/pr/test/modint.pr	2004-05-24 23:26:37 UTC (rev 545)
+++ trunk/pr/test/modint.pr	2004-05-25 03:04:19 UTC (rev 546)
@@ -7,7 +7,7 @@
     def add_(other):
         if self.modulo != other.modulo: 
             raise TypeError 
-        return (self.protoList()[1])(Int.add_{self}(other) % self.modulo) 
+        return (self.protoChain()[1])(Int.add_{self}(other) % self.modulo) 
 
 object Mod16Int(ModInt):
     modulo = 16