From c8c12f3cc2181a1964611af79d69b3ffef4e0d34 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 11 Dec 2008 15:12:45 +1000 Subject: edited index terms as per wcohen --- doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US/Arrays.xml') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml index 63c3df04..ac320fcd 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml @@ -6,7 +6,7 @@ Associative Arrays arrays -introduction +associative arrays @@ -20,11 +20,13 @@ + associative arrays @@ -38,14 +40,14 @@ arrays - + associative arrays introduction @@ -58,14 +60,14 @@ arrays - + associative arrays introduction @@ -78,14 +80,14 @@ arrays - + associative arrays introduction @@ -99,13 +101,13 @@ Since associative arrays are normally processed in multiple probes (as we will demonstrate later), they are declared as global variables in the SystemTap script. The syntax for accessing an element in an associative array is similar to that of awk, and is as follows: - + associative arrays introduction @@ -131,14 +133,14 @@ Here, the array_name is any arbitrary name the array uses. The index_expression is used to refer to a specific unique key in the array. To illustrate, let us try to build an array named foo that specifies the ages of three people (i.e. the unique keys): tom, dick, and harry. To assign them the ages (i.e. associated values) of 23, 24, and 25 respectively, we'd use the following array statements: - + associative arrays introduction -- cgit From 16da491f985baaa0bfbdc9cd0098d508534bf75b Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 15 Dec 2008 14:52:52 -0500 Subject: Minor edits in associative array sections. --- doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US/Arrays.xml') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml index ac320fcd..3d3dec01 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml @@ -161,7 +161,7 @@ foo["harry"] = 25 -You can specify up to 5 index expressons in an array statement, each one delimited by a comma (,). This is useful if you wish to have a key that contains multiple pieces of information. The following line from uses 5 elements for the key: process ID, executable name, user ID, parent ID, and string "W". It associates the value of devname with that key. +You can specify up to 5 index expressons in an array statement, each one delimited by a comma (,). This is useful if you wish to have a key that contains multiple pieces of information. The following line from uses 5 elements for the key: process ID, executable name, user ID, parent process ID, and string "W". It associates the value of devname with that key. device[pid(),execname(),uid(),ppid(),"W"] = devname -- cgit