]> sourceware.org Git - systemtap.git/commitdiff
Minor edits in associative array sections.
authorWilliam Cohen <wcohen@redhat.com>
Mon, 15 Dec 2008 19:52:52 +0000 (14:52 -0500)
committerWilliam Cohen <wcohen@redhat.com>
Mon, 15 Dec 2008 19:52:52 +0000 (14:52 -0500)
doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
doc/SystemTap_Beginners_Guide/en-US/Arrays.xml

index bf49632102a70007b54a56bbab1339ec9d23cc89..00a8673c965d989ec0890c8612119c5562994ba2 100644 (file)
@@ -505,7 +505,7 @@ probe timer.s(3)
 }
 </screen>
 
-<para>This <command>foreach</command> statement instructs the script to process the elements in the array <command>reads</command> in descending order (of associated value). The <command>limit 10</command> option instructs the script to only process the first ten elements in the array (i.e. the first 10, starting with the highest value).</para> 
+<para>This <command>foreach</command> statement instructs the script to process the elements in the array <command>reads</command> in descending order (of associated value). The <command>limit 10</command> option instructs the <command>foreach</command> to only process the first ten iterations (i.e. print the first 10, starting with the highest value).</para> 
 </section>
 
 <section id="arrayops-deleting">
@@ -665,7 +665,7 @@ probe vfs.read
 probe timer.s(3)
 {
   printf("=======\n")
-  foreach (count in reads+
+  foreach (count in reads-
     printf("%s : %d \n", count, reads[count])
   delete reads
 }
@@ -673,7 +673,7 @@ probe timer.s(3)
 probe end
 {
   printf("TOTALS\n")
-  foreach (total in totalreads+)
+  foreach (total in totalreads-)
     printf("%s : %d \n", total, totalreads[total])
 }
 </screen>
@@ -788,7 +788,7 @@ probe timer.s(3)
 </formalpara>
 
 <screen>
-if([<replaceable>index_expression</replaceable>] in <replaceable>array_name</replaceable>)
+if([<replaceable>index_expression</replaceable>] in <replaceable>array_name</replaceable>) <replaceable>statement</replaceable>
 </screen>
 
 <para>To illustrate this, consider the following example:</para>
index ac320fcdcdc6210f94d622840ed1179034b3fae9..3d3dec01598aaef8d708ee59a77c6f8fbb972fde 100644 (file)
@@ -161,7 +161,7 @@ foo["harry"] = 25
 </screen>
 </example>
 
-<para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to have a key that contains multiple pieces of information. The following line from <xref linkend="scriptdisktop"/> uses 5 elements for the key: process ID, executable name, user ID, parent ID, and string "W". It associates the value of <command>devname</command> with that key.</para>
+<para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to have a key that contains multiple pieces of information. The following line from <xref linkend="scriptdisktop"/> uses 5 elements for the key: process ID, executable name, user ID, parent process ID, and string "W". It associates the value of <command>devname</command> with that key.</para>
 
 <screen>
 device[pid(),execname(),uid(),ppid(),"W"] = devname
This page took 0.028875 seconds and 5 git commands to generate.