[Swift-commit] r2302 - trunk/docs

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Oct 15 17:23:13 CDT 2008


Author: benc
Date: 2008-10-15 17:23:12 -0500 (Wed, 15 Oct 2008)
New Revision: 2302

Modified:
   trunk/docs/userguide.xml
Log:
readdata2 userguide

Modified: trunk/docs/userguide.xml
===================================================================
--- trunk/docs/userguide.xml	2008-10-15 10:28:13 UTC (rev 2301)
+++ trunk/docs/userguide.xml	2008-10-15 22:23:12 UTC (rev 2302)
@@ -2220,6 +2220,43 @@
 This procedure is new in 0.4.
 			</para>
 		</section>
+		<section id="procedure.readdata2"><title>readdata2</title>
+			<para>
+readdata2 will read data from a specified file, like readdata, but using
+a different file format more closely related to that used by the
+ext mapper.
+			</para>
+			<para>
+Input files should list, one per line, a path into a Swift structure, and
+the value for that position in the structure:
+				<screen>
+rows[0].columns[0] = 0                                                          
+rows[0].columns[1] = 2                                                          
+rows[0].columns[2] = 4                                                          
+rows[1].columns[0] = 1                                                          
+rows[1].columns[1] = 3                                                          
+rows[1].columns[2] = 5 
+				</screen>
+which can be read into a structure defined like this:
+				<programlisting>
+type vector {                                                                   
+        int columns[];                                                          
+}                                                                               
+                                                                                
+type matrix {                                                                   
+        vector rows[];                                                          
+}                                                                               
+                                                                                
+matrix m;                                                                       
+                                                                                
+m = readData2("readData2.in");    
+				</programlisting>
+			</para>
+			
+			<para>
+This procedure is new in 0.7.
+			</para>
+		</section>
 		<section id="procedure.print"><title>print</title>
 			<para>
 Deprecated - use <link linkend="procedure.trace">trace</link> instead.




More information about the Swift-commit mailing list