summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Sethi2010-11-03 11:51:25 +0530
committerAmit Sethi2010-11-03 11:51:25 +0530
commit3a20d5d7669a13bc0a1b75bbf6b97e5eff6c408e (patch)
tree41111d4f6e4d612fc252c6b8b083b4b2ed0e2788
parent14be7b3f3fb25f63312b9174698df1e6722cdc07 (diff)
downloadst-scripts-3a20d5d7669a13bc0a1b75bbf6b97e5eff6c408e.tar.gz
st-scripts-3a20d5d7669a13bc0a1b75bbf6b97e5eff6c408e.tar.bz2
st-scripts-3a20d5d7669a13bc0a1b75bbf6b97e5eff6c408e.zip
Made some changes to accessing pieces of arrays while doing a test recording.
-rw-r--r--accessing-pieces-arrays/script.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/accessing-pieces-arrays/script.rst b/accessing-pieces-arrays/script.rst
index a1d30f6..1c7b9b3 100644
--- a/accessing-pieces-arrays/script.rst
+++ b/accessing-pieces-arrays/script.rst
@@ -61,6 +61,8 @@ use to work through this tutorial.
Pause the video here and make sure you have the arrays A and C,
typed in correctly.
+{{{ Pause the recording and type the arrays A,C }}}
+
Let us begin with the most elementary thing, accessing individual
elements. Also, let us first do it with the one-dimensional array
A, and then do the same thing with the two-dimensional array.
@@ -71,6 +73,8 @@ To access, the element 34 in A, we say,
A[2]
+A of 2, note that we are using square brackets.
+
Like lists, indexing starts from 0 in arrays, too. So, 34, the
third element has the index 2.
@@ -79,6 +83,8 @@ Now, let us access the element 34 from C. To do this, we say
C[2, 3]
+C of 2,3.
+
34 is in the third row and the fourth column, and since indexing
begins from zero, the row index is 2 and column index is 3.