diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-01-23 14:28:47 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-01-23 14:28:47 +0100 |
commit | c3bad3042df505a3470f1e20b09822a9df1d4761 (patch) | |
tree | 6842e8eaa705e406379d34cf07a85431b6d71344 /doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | |
parent | 750b1f2f5c84acaf0776de5239dc81e2e95c1dec (diff) | |
parent | f120873cb40cfc16cc94f06fd722abc927b96227 (diff) | |
download | systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.tar.gz systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.tar.xz systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.zip |
Merge branch 'master' into pr6866.
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/Arrays.xml')
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml index 63c3df04..3d3dec01 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml @@ -6,7 +6,7 @@ <title>Associative Arrays</title> <indexterm> <primary>arrays</primary> -<secondary>introduction</secondary> +<seealso>associative arrays</seealso> </indexterm> <indexterm> @@ -20,11 +20,13 @@ <!-- next 2 indexterms for key pairs --> +<!-- <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>key pairs</tertiary> </indexterm> +--> <indexterm> <primary>associative arrays</primary> @@ -38,14 +40,14 @@ <tertiary>arrays</tertiary> </indexterm> -<!-- next 2 indexterms for unique keys --> +<!-- next 2 indexterms for unique keys <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>unique keys</tertiary> </indexterm> - +--> <indexterm> <primary>associative arrays</primary> <secondary>introduction</secondary> @@ -58,14 +60,14 @@ <tertiary>arrays</tertiary> </indexterm> -<!-- next 2 indexterms for associated values --> +<!-- next 2 indexterms for associated values <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>associated values</tertiary> </indexterm> - +--> <indexterm> <primary>associative arrays</primary> <secondary>introduction</secondary> @@ -78,14 +80,14 @@ <tertiary>arrays</tertiary> </indexterm> -<!-- next 2 indexterms for index expression --> +<!-- next 2 indexterms for index expression <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>index expression</tertiary> </indexterm> - +--> <indexterm> <primary>associative arrays</primary> <secondary>introduction</secondary> @@ -99,13 +101,13 @@ </indexterm> <para>Since associative arrays are normally processed in multiple probes (as we will demonstrate later), they are declared as <command>global</command> variables in the SystemTap script. The syntax for accessing an element in an associative array is similar to that of <command>awk</command>, and is as follows:</para> -<!-- next 3 indexterms for syntax --> +<!-- next 3 indexterms for syntax <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>syntax</tertiary> </indexterm> - +--> <indexterm> <primary>associative arrays</primary> <secondary>introduction</secondary> @@ -131,14 +133,14 @@ <para>Here, the <command><replaceable>array_name</replaceable></command> is any arbitrary name the array uses. The <command><replaceable>index_expression</replaceable></command> is used to refer to a specific unique key in the array. To illustrate, let us try to build an array named <command>foo</command> that specifies the ages of three people (i.e. the unique keys): <command>tom</command>, <command>dick</command>, and <command>harry</command>. To assign them the ages (i.e. associated values) of 23, 24, and 25 respectively, we'd use the following array statements:</para> -<!-- next 2 indexterms for example --> +<!-- next 2 indexterms for example <indexterm> <primary>arrays</primary> <secondary>introduction</secondary> <tertiary>example</tertiary> </indexterm> - +--> <indexterm> <primary>associative arrays</primary> <secondary>introduction</secondary> @@ -159,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 |