diff options
author | ddomingo <ddomingo@redhat.com> | 2008-11-17 13:04:02 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2008-11-17 13:04:02 +1000 |
commit | b3e8f644958f5033beebeb91edf11d5edf21c8c1 (patch) | |
tree | 68216ec5ea87f83068c839f8dcef80296e7b95b5 /doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml | |
parent | 3ca1f6524b3592b377b1f9ad19bdae6eaa511bc4 (diff) | |
download | systemtap-steved-b3e8f644958f5033beebeb91edf11d5edf21c8c1.tar.gz systemtap-steved-b3e8f644958f5033beebeb91edf11d5edf21c8c1.tar.xz systemtap-steved-b3e8f644958f5033beebeb91edf11d5edf21c8c1.zip |
revisions as per dsmith
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml')
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml | 14 |
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() } } |