rev 192 - trunk/pr

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-03-28 18:32:01 -0500 (Sun, 28 Mar 2004)
New Revision: 192

Added:
   trunk/pr/scope.pr
   trunk/pr/super.pr
Log:
added some test code from web site

Added: trunk/pr/scope.pr
===================================================================
--- trunk/pr/scope.pr	2004-03-28 21:03:12 UTC (rev 191)
+++ trunk/pr/scope.pr	2004-03-28 23:32:01 UTC (rev 192)
@@ -0,0 +1,19 @@
+
+print
+print "This should print 1 2 3 4 5 ..."
+print
+
+X=1
+def f1():
+	x=2
+	def @f2():
+		x=3
+		print X, &x, x, .x, @x
+f1()
+obj = Object()
+obj.x = 4
+obj.f = f2
+x=5
+obj.f()
+
+print
Added: trunk/pr/super.pr
===================================================================
--- trunk/pr/super.pr	2004-03-28 21:03:12 UTC (rev 191)
+++ trunk/pr/super.pr	2004-03-28 23:32:01 UTC (rev 192)
@@ -0,0 +1,13 @@
+proto = Object()
+obj = proto()
+proto.x = 2
+obj.x   = 1
+with obj:
+	print .x   # prints 1
+	print ^x   # prints 2
+	
+print '\nabove should say...'
+print 1
+print 2
+print
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.