[Swift-commit] r7415 - SwiftApps/tryswift/scripts
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Wed Dec 11 16:55:11 CST 2013
Author: davidk
Date: 2013-12-11 16:55:11 -0600 (Wed, 11 Dec 2013)
New Revision: 7415
Modified:
SwiftApps/tryswift/scripts/002-helloworld.html
SwiftApps/tryswift/scripts/003-foreach.html
SwiftApps/tryswift/scripts/004-multipleapps.html
Log:
Make sure html documentation matches code
Modified: SwiftApps/tryswift/scripts/002-helloworld.html
===================================================================
--- SwiftApps/tryswift/scripts/002-helloworld.html 2013-12-11 22:22:44 UTC (rev 7414)
+++ SwiftApps/tryswift/scripts/002-helloworld.html 2013-12-11 22:55:11 UTC (rev 7415)
@@ -17,9 +17,9 @@
most scripts.</p>
<pre>
-app (file o) echo (string s)
+app (file out) echo_app (string s)
{
- echo s stdout=filename(o);
+ echo s stdout=filename(out);
}
</pre>
Modified: SwiftApps/tryswift/scripts/003-foreach.html
===================================================================
--- SwiftApps/tryswift/scripts/003-foreach.html 2013-12-11 22:22:44 UTC (rev 7414)
+++ SwiftApps/tryswift/scripts/003-foreach.html 2013-12-11 22:55:11 UTC (rev 7415)
@@ -13,7 +13,7 @@
example, simulate will print a single number in the range of 1-100.
<pre>
-app (file o) simulate ()
+app (file o) simulate_app ()
{
simulate stdout=filename(o);
}
@@ -27,8 +27,8 @@
<pre>
foreach i in [1:10] {
string fname=strcat("output/sim_", i, ".out");
- file f <single_file_mapper; file=fname>;
- f = simulate();
+ file f <single_file_mapper; file=fname>;
+ f = simulate_app();
}
</pre>
Modified: SwiftApps/tryswift/scripts/004-multipleapps.html
===================================================================
--- SwiftApps/tryswift/scripts/004-multipleapps.html 2013-12-11 22:22:44 UTC (rev 7414)
+++ SwiftApps/tryswift/scripts/004-multipleapps.html 2013-12-11 22:55:11 UTC (rev 7415)
@@ -15,7 +15,7 @@
<p>The first change in this script is to the simulate script:</p>
<pre>
-app (file o) simulate (int time)
+app (file o) simulate_app (int time)
{
simulate "-t" time stdout=filename(o);
}
@@ -28,7 +28,7 @@
<p>We introduce a new app call called stats:</p>
<pre>
-app (file o) stats (file s[])
+app (file o) stats_app (file s[])
{
stats filenames(s) stdout=filename(o);
}
@@ -40,7 +40,7 @@
<p>Within the foreach loop:
<pre>
- simout = simulate(time);
+ simout = simulate_app(time);
sims[i] = simout;
</pre>
@@ -48,13 +48,13 @@
<pre>
foreach i in [1:nsims] {
string fname = strcat("output/sim_",i,".out");
- file simout <single_file_mapper; file=fname>;
- simout = simulate(time);
+ file simout <single_file_mapper; file=fname>
+ simout = simulate_app(time);
sims[i] = simout;
}
-file average<"output/average.out">;
-average = stats(sims);
+file average <"output/average.out">
+average = stats_app(sims);
</pre>
Execute the script and view output/average.out to verify it succeeded.
More information about the Swift-commit
mailing list