[Swift-commit] r6381 - in trunk/docs: merged/refmanual userguide

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Thu Mar 14 09:53:11 CDT 2013


Author: ketan
Date: 2013-03-14 09:53:10 -0500 (Thu, 14 Mar 2013)
New Revision: 6381

Modified:
   trunk/docs/merged/refmanual/swiftlang
   trunk/docs/userguide/site_catalog
Log:
site catalog work directory

Modified: trunk/docs/merged/refmanual/swiftlang
===================================================================
--- trunk/docs/merged/refmanual/swiftlang	2013-03-13 22:43:17 UTC (rev 6380)
+++ trunk/docs/merged/refmanual/swiftlang	2013-03-14 14:53:10 UTC (rev 6381)
@@ -150,14 +150,20 @@
 (x1, x2) = f(i1, i2);
 ----
 
+=== Swift keywords
 
+Following is a list of Swift keywords:
+
+    app type float int boolean string global
+    foreach if else iterate switch case default
+    file while import
+
 == Types
 
-Swift provides a similar range of primitive types to many other
-programming languages. Files are a primitive type in Swift, unlike
-in many other languages, and have a number of special characteristics
-that merit special mention.
-Two basic kinds of data structure are provided: arrays and structs.
+Swift provides a similar range of primitive types to many other programming
+languages. Files are a primitive type in Swift, unlike in many other languages,
+and have a number of special characteristics that merit special mention. Two
+basic kinds of data structure are provided: arrays and structs.
 
 === Primitive Types
 
@@ -335,17 +341,17 @@
 
 === Iteration
 
-Iteration is performed with the +foreach+ and +iterate+ statement.
+Iteration in parallel is performed with the +foreach+ and +iterate+ statement.
 
 ==== Foreach loop
 
 The +foreach+ loop allows for parallel iteration over an array:
 
 ----
-string A[];
-foreach value, index in A
-{
-  tracef("A[%i] = %s\n", index, value);
+foreach value[, index] in [expression]{
+    statement;
+    statement;
+    ...
 }
 ----
 
@@ -363,6 +369,23 @@
 }
 ----
 
+Examples of +foreach+ loop are as follows:
+
+----
+string A[];
+foreach value, index in A
+{
+  tracef("A[%i] = %s\n", index, value);
+}
+----
+
+----
+trace(" First five odd numbers");
+foreach idx in [1:10:2]{
+    tracef("%i\n",idx);
+}
+----
+
 ==== Iterate loop
 
 The +iterate+ loop allows for sequential iteration.

Modified: trunk/docs/userguide/site_catalog
===================================================================
--- trunk/docs/userguide/site_catalog	2013-03-13 22:43:17 UTC (rev 6380)
+++ trunk/docs/userguide/site_catalog	2013-03-14 14:53:10 UTC (rev 6381)
@@ -148,14 +148,15 @@
 stored.
 
 ----
-<workdirectory>/home/benc</workdirectory>
+<workdirectory>/tmp/swift.workdir</workdirectory>
 ----
 
-This file must be accessible through the transfer mechanism specified in
-the <gridftp> element and also mounted on all worker nodes that will
-be used for execution. A shared cluster scratch filesystem is
-appropriate for this.
+This directory must be accessible through the specified transfer mechanism and
+also mounted on all worker nodes that will be used for execution. A shared
+cluster scratch filesystem is appropriate for this. Note that you need to
+specify _absolute pathname_ for this field.
 
+
 Scratch
 ~~~~~~~
 




More information about the Swift-commit mailing list