aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/array2.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/array2.spad.pamphlet')
-rw-r--r--src/algebra/array2.spad.pamphlet6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index 1f3aa9fe..f7597b79 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -306,11 +306,13 @@ InnerTwoDimensionalArray(R,Row,Col):_
concat(s, "\end{array} \right]")$String
row(m,i) ==
- i < 1 or i >= nrows m => error "row: index out of range"
+ i < 1 or i > nrows m => error "row: index out of range"
+ i := dec i
[[rep(m).i.j for j in 0..ncols m - 1]]$Row
column(m,j) ==
- j < 1 or j >= ncols m => error "column: index out of range"
+ j < 1 or j > ncols m => error "column: index out of range"
+ j := dec j
[[rep(m).i.j for i in 0..nrows m - 1]]$Col