summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml')
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
index 32fdf021..f63d1d70 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
@@ -30,7 +30,12 @@ foo[execname()] = gettimeofday_s()
</section>
<section id="arrayops-readvalues">
<title>Reading Values From Arrays</title>
- <para>You can also use the <command>=</command> operator to read values from an array. This is accomplished by simply including the <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command> as an element in a mathematical expression. For example:</para>
+ <para>You can also read values from an array the same way you would read the value of a variable.
+ To do so, include the
+ <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command>
+ statement as an element in a mathematical expression. For example:</para>
+<!--
+ <para>You can also use the <command>=</command> operator to read values from an array. This is accomplished by simply including the <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command> as an element in a mathematical expression. For example:</para>-->
<example id="arrayreadingvaluesfrom">
<title>Using Array Values in Simple Computations</title>
@@ -187,7 +192,9 @@ probe timer.s(2)
foreach (count in reads+)
printf("%s : %d \n", count, reads[count])
if(reads["stapio"] >= 20)
- {exit()}
+ {
+ exit()
+ }
}
</programlisting>
</example>
@@ -221,7 +228,8 @@ probe timer.s(2)
foreach (count in reads+)
printf("%s : %d \n", count, reads[count])
if(["stapio"] in reads)
- {printf("stapio read detected, exiting\n")
+ {
+ printf("stapio read detected, exiting\n")
exit()
}
}