diff options
Diffstat (limited to 'cpp/032array')
-rw-r--r-- | cpp/032array | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/032array b/cpp/032array index 284ca592..3aa531d0 100644 --- a/cpp/032array +++ b/cpp/032array @@ -56,7 +56,8 @@ if (x.types[0] != Type_number["array"] && size_of(x) != data.size()) return 1 + Memory[r.value]*size_of(array_element(r.types)); } -//: To access elements of an array, use 'index' +//:: To access elements of an array, use 'index' + :(scenario "index") recipe main [ 1:integer <- copy 3:literal @@ -139,7 +140,7 @@ recipe main [ +run: address to copy is 2 +mem: storing 2 in location 5 -//: To write to elements of containers, you need their address. +//:: To write to elements of containers, you need their address. :(scenario "index_indirect") recipe main [ |