about summary refs log tree commit diff stats
path: root/032array.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-08-10 23:15:00 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-08-10 23:15:00 -0700
commit9edabeaa21186c089a9b11f63ba3164f9fa753fb (patch)
treebf02bd60f67c53ea49ecd15fb67f3fd58b7138f2 /032array.cc
parentae2b59cf25e2cae2694af1974e550dd1bc5dd137 (diff)
downloadmu-9edabeaa21186c089a9b11f63ba3164f9fa753fb.tar.gz
1975 - let's start using traces in lessons
More friendly way to 'stash' stuff in the trace so that you can toggle
lines of code to see their stashed traces.
Diffstat (limited to '032array.cc')
-rw-r--r--032array.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/032array.cc b/032array.cc
index 7220e0f0..bf51382d 100644
--- a/032array.cc
+++ b/032array.cc
@@ -37,6 +37,16 @@ recipe main [
 +mem: storing 15 in location 8
 +mem: storing 16 in location 9
 
+:(scenario stash_array)
+recipe main [
+  1:number <- copy 3  # length
+  2:number <- copy 14
+  3:number <- copy 15
+  4:number <- copy 16
+  stash [foo: ], 1:array:number
+]
++app: foo: 3 14 15 16
+
 //: disable the size mismatch check since the destination array need not be initialized
 :(before "End size_mismatch(x) Cases")
 if (x.types.at(0) == Type_ordinal["array"]) return false;