diff options
-rw-r--r-- | 032array.cc | 2 | ||||
-rw-r--r-- | 070table.mu | 4 | ||||
-rw-r--r-- | html/032array.cc.html | 2 | ||||
-rw-r--r-- | html/070table.mu.html | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/032array.cc b/032array.cc index c2598d91..b8b4088a 100644 --- a/032array.cc +++ b/032array.cc @@ -188,7 +188,7 @@ def main [ 2:num <- copy 14 3:num <- copy 15 4:num <- copy 16 - 5:num <- index 1:array:num:3, 0 + 5:num <- index 1:array:num:3, 0/index # the index must be a non-negative whole number ] +mem: storing 14 in location 5 diff --git a/070table.mu b/070table.mu index ce51f317..efa78a2c 100644 --- a/070table.mu +++ b/070table.mu @@ -1,5 +1,5 @@ -# A table is like an array, except that its keys are not integers but -# arbitrary types. +# A table is like an array, except that you can index it with arbitrary types +# and not just non-negative whole numbers. scenario table-read-write [ local-scope diff --git a/html/032array.cc.html b/html/032array.cc.html index d8c73933..2a3d7b1b 100644 --- a/html/032array.cc.html +++ b/html/032array.cc.html @@ -225,7 +225,7 @@ $error: <span class="Constant">0</span> <span class="Constant">2</span>:num<span class="Special"> <- </span>copy <span class="Constant">14</span> <span class="Constant">3</span>:num<span class="Special"> <- </span>copy <span class="Constant">15</span> <span class="Constant">4</span>:num<span class="Special"> <- </span>copy <span class="Constant">16</span> - <span class="Constant">5</span>:num<span class="Special"> <- </span>index <span class="Constant">1</span>:array:num:<span class="Constant">3</span><span class="Delimiter">,</span> <span class="Constant">0</span> + <span class="Constant">5</span>:num<span class="Special"> <- </span>index <span class="Constant">1</span>:array:num:<span class="Constant">3</span><span class="Delimiter">,</span> <span class="Constant">0</span>/index <span class="Comment"># the index must be a non-negative whole number</span> ] <span class="traceContains">+mem: storing 14 in location 5</span> diff --git a/html/070table.mu.html b/html/070table.mu.html index 85df5029..9cc6e3e1 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -32,8 +32,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color </head> <body> <pre id='vimCodeElement'> -<span class="Comment"># A table is like an array, except that its keys are not integers but</span> -<span class="Comment"># arbitrary types.</span> +<span class="Comment"># A table is like an array, except that you can index it with arbitrary types</span> +<span class="Comment"># and not just non-negative whole numbers.</span> <span class="muScenario">scenario</span> table-read-write [ <span class="Constant">local-scope</span> |