rev 508 - in trunk: docs/tutorial pr/tutorial

SVN User <[email protected]> Wed, 19 May 2004 01:20:43 -0400
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-05-19 01:20:40 -0400 (Wed, 19 May 2004)
New Revision: 508

Modified:
   trunk/docs/tutorial/tutorial1.htm
   trunk/pr/tutorial/tut2.pr
   trunk/pr/tutorial/tut3.pr
Log:
cleaned up section 1 of tutorial, fixed example 1.3

Modified: trunk/docs/tutorial/tutorial1.htm
===================================================================
--- trunk/docs/tutorial/tutorial1.htm	2004-05-19 04:59:34 UTC (rev 507)
+++ trunk/docs/tutorial/tutorial1.htm	2004-05-19 05:20:40 UTC (rev 508)
@@ -43,7 +43,7 @@
           summary of available command-line options.</p>
         <pre>C:\>prothon
 
-Prothon 0.1 Interactive Console, Build 477, May 12 2004 (Ctrl-D to exit)
+Prothon 0.1 Interactive Console, Build 500, May 17 2004 (Ctrl-D to exit)
 >>>
 </pre>
         <p>As you can see from the console heading, you exit the interactive console by 
@@ -118,10 +118,11 @@
 Argument: world
 Argument: test 1 2 3</pre> 
         <p>The source code for tut2.pr is: </p>
-        <pre>for arg in Argv:
-    print "Argument:", arg
-</pre>
-        <p>The arguments are placed in a Prothon list called Argv with the program 
+        <pre># Prothon source file tut2.pr
+ 
+for arg in argv_:
+    print "Argument:", arg</pre>
+        <p>The arguments are placed in a Prothon list called argv__ with the program 
           name as the first item as is traditional. The for loop and lists will 
           be described later.</p>
         <p><font face="Verdana, Arial, Helvetica, sans-serif" size="+2"><a name="confile"></a>1.3 
@@ -135,30 +136,30 @@
 Argument: hello
 Argument: world
 
-Prothon 0.1 Interactive Console, Build 477, May 12 2004 (Ctrl-D to exit)
->>> print Argv[0]
+Prothon 0.1 Interactive Console, Build 500, May 17 2004 (Ctrl-D to exit)
+>>> print argv_[0]
 tut2.pr</pre>
         <p><a name="toption"></a>There is even a way to run the console at the 
           same time your file is executing. Here is a simple prothon program that 
-          adds 1 to a global variable called Object.timer every second:</p>
+          adds 1 to a variable called Main.timer every second:</p>
         <pre># Prothon source file tut3.pr
-
+ 
 for i in 1_000_000:
-    Object.timer = i
+    Main.timer = i
     Sleep(1.0)</pre>
         If you run this as a background program then you can examine the timer 
-        variable in the console at the same time. The -s command line option starts 
+        variable in the console at the same time. The -t command line option starts 
         a prothon file executing as a background thread. Hint: to repeat a command 
         in the console, use the up arrow: 
-        <pre>C:\Prothon\pr\tutorial>prothon -s tut3.pr -i
+        <pre>C:\Prothon\pr\tutorial>prothon -t tut3.pr -i
 
-Prothon 0.1 Interactive Console, Build 477, May 16 2004 (Ctrl-D to exit)
->>> print Object.timer
-6
->>> print Object.timer
+Prothon 0.1 Interactive Console, Build 500, May 17 2004 (Ctrl-D to exit)
+>>> print Main.timer
+5
+>>> print Main.timer
 7
->>> print Object.timer
-9
+>>> print Main.timer
+8
 >>></pre>
         <p>You can actually start many files executing with the -s option and 
           the console all at once, but we won't show that here.</p>
Modified: trunk/pr/tutorial/tut2.pr
===================================================================
--- trunk/pr/tutorial/tut2.pr	2004-05-19 04:59:34 UTC (rev 507)
+++ trunk/pr/tutorial/tut2.pr	2004-05-19 05:20:40 UTC (rev 508)
@@ -1,3 +1,5 @@
 
-for arg in Argv:
+# Prothon source file tut2.pr
+
+for arg in argv_:
     print "Argument:", arg
Modified: trunk/pr/tutorial/tut3.pr
===================================================================
--- trunk/pr/tutorial/tut3.pr	2004-05-19 04:59:34 UTC (rev 507)
+++ trunk/pr/tutorial/tut3.pr	2004-05-19 05:20:40 UTC (rev 508)
@@ -2,5 +2,5 @@
 # Prothon source file tut3.pr
 
 for i in 1_000_000:
-    Object.timer = i
+    Main.timer = i
     Sleep(1.0)