rev 486 - in trunk: docs/tutorial pr/tutorial
SVN User <[email protected]> Fri, 14 May 2004 14:11:21 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-05-14 14:11:17 -0400 (Fri, 14 May 2004)
New Revision: 486
Added:
trunk/pr/tutorial/tut4.pr
Modified:
trunk/docs/tutorial/tutorial5.htm
Log:
added tut4.pr cleaned up tut4 in tutorial5.htm
Modified: trunk/docs/tutorial/tutorial5.htm
===================================================================
--- trunk/docs/tutorial/tutorial5.htm 2004-05-14 18:02:22 UTC (rev 485)
+++ trunk/docs/tutorial/tutorial5.htm 2004-05-14 18:11:17 UTC (rev 486)
@@ -75,31 +75,31 @@
<pre># Prothon source file tut4.pr
if True:
- print "Hello World"
-
+ print "Hello World"
+
if False:
- print "I'm invisible"
-
+ print "I'm invisible"
+
if False:
- print 'not this one'
+ print 'not this one'
else:
- print 'This is the one'
+ print 'This is the one'
if 0:
- print 'not 0, it is false'
+ print 'not 0, it is false'
elif "":
- print 'not "", it is false also'
+ print 'not "", it is false also'
elif []:
- print 'not [] either'
+ print 'not [] either'
else:
- print 'All the others are false, so I'm the one'
+ print "All the others are false, so I'm the one"
if 'x'+"abc":
- if 7**3:
- print "Many things are true"</pre>
+ if 7**3:
+ print "Many things are true"</pre>
<p>Here is the output of running the file tut4.pr above: </p>
<pre>Hello World
-False is the one
+This is the one
XXX
Many things are true
</pre>
Added: trunk/pr/tutorial/tut4.pr
===================================================================
--- trunk/pr/tutorial/tut4.pr 2004-05-14 18:02:22 UTC (rev 485)
+++ trunk/pr/tutorial/tut4.pr 2004-05-14 18:11:17 UTC (rev 486)
@@ -0,0 +1,26 @@
+
+# Prothon source file tut4.pr
+
+if True:
+ print "Hello World"
+
+if False:
+ print "I'm invisible"
+
+if False:
+ print 'not this one'
+else:
+ print 'This is the one'
+
+if 0:
+ print 'not 0, it is false'
+elif "":
+ print 'not "", it is false also'
+elif []:
+ print 'not [] either'
+else:
+ print "All the others are false, so I'm the one"
+
+if 'x'+"abc":
+ if 7**3:
+ print "Many things are true"