From 5191b61cb908d096d872ad26f8f632641ff15cc8 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 20 Nov 2008 10:56:02 +1000 Subject: revise as per wcohen, run 2 --- doc/SystemTap_Beginners_Guide/en-US/Arrays.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 cf8b2fea..c487503b 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml @@ -32,11 +32,11 @@ foo["harry"] = 25
- Tuples + Array Slots Another important point to remember in arrays is that each element therein (i.e. the indexed expression) exists in a slot. A key pair's slot is defined by the order in which each pair's unique key is defined. In our sample array foo in , the key pair that uses the unique key tom is in the first slot, since tom was the first unique key to be defined. dick is in the second slot, and so on. - -The sequence in which each key pair appears in an array (as defined by each pair's slot) is referred to as a tuple. Tuples allow us to refer to key pairs in an array by the order in which they appear in the sequence. + For example, the array statements in set 23 as the associated value of the unique key tom. Given the same array foo, we can increment the associated value of tom by 1 using the operator ++, like so: @@ -44,7 +44,7 @@ foo["harry"] = 25 foo["tom"] ++ -The above statement will increase the associated value of unique key tom to 24. Now, looking back at , we know that dick was the first uniqe key to be defined. As such, we can perform the same operation (i.e. incrementing associated value by 1) to dick using the following statement: +The above statement will increase the associated value of unique key tom to 24. Now, looking back at , we know that dick was the first unique key to be defined. As such, we can perform the same operation (i.e. incrementing associated value by 1) to dick using the following statement: foo[2] ++ -- cgit