diff options
-rw-r--r-- | 101run_sandboxed.cc | 10 | ||||
-rw-r--r-- | html/101run_sandboxed.cc.html | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/101run_sandboxed.cc b/101run_sandboxed.cc index d6680f0e..3db6b0a4 100644 --- a/101run_sandboxed.cc +++ b/101run_sandboxed.cc @@ -3,10 +3,10 @@ :(scenario run_interactive_code) def main [ - 1:num/raw <- copy 0 + 1:num <- copy 0 2:text <- new [1:num/raw <- copy 34] run-sandboxed 2:text - 3:num/raw <- copy 1:num/raw + 3:num <- copy 1:num ] +mem: storing 34 in location 3 @@ -326,7 +326,7 @@ def main [ # try to interactively add 2 and 2 1:text <- new [add 2, 2] 2:text <- run-sandboxed 1:text - 10:@:char <- copy 2:text/lookup + 10:@:char <- copy *2:text ] # first letter in the output should be '4' in unicode +mem: storing 52 in location 11 @@ -340,7 +340,7 @@ def main [ z:text <- append x:text, y:text ] 2:text <- run-sandboxed 1:text - 10:@:char <- copy 2:text/lookup + 10:@:char <- copy *2:text ] # output contains "ab" +mem: storing 97 in location 11 @@ -352,7 +352,7 @@ def main [ 1:text <- new [x:num <- copy 34 get x:num, foo:offset] 2:text, 3:text <- run-sandboxed 1:text - 10:@:char <- copy 3:text/lookup + 10:@:char <- copy *3:text ] # error should be "unknown element foo in container number" +mem: storing 117 in location 11 diff --git a/html/101run_sandboxed.cc.html b/html/101run_sandboxed.cc.html index 1c6f24d4..1a75c8b1 100644 --- a/html/101run_sandboxed.cc.html +++ b/html/101run_sandboxed.cc.html @@ -67,10 +67,10 @@ if ('onhashchange' in window) { <span id="L3" class="LineNr"> 3 </span> <span id="L4" class="LineNr"> 4 </span><span class="Delimiter">:(scenario run_interactive_code)</span> <span id="L5" class="LineNr"> 5 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L6" class="LineNr"> 6 </span> <span class="Constant">1</span>:num/<span class="Special">raw <- </span>copy <span class="Constant">0</span> +<span id="L6" class="LineNr"> 6 </span> <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">0</span> <span id="L7" class="LineNr"> 7 </span> <span class="Constant">2</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [<span class="Constant">1</span>:num/<span class="Special">raw <- </span>copy <span class="Constant">34</span>] <span id="L8" class="LineNr"> 8 </span> run-sandboxed <span class="Constant">2</span>:text -<span id="L9" class="LineNr"> 9 </span> <span class="Constant">3</span>:num/<span class="Special">raw <- </span>copy <span class="Constant">1</span>:num/<span class="Special">raw</span> +<span id="L9" class="LineNr"> 9 </span> <span class="Constant">3</span>:num<span class="Special"> <- </span>copy <span class="Constant">1</span>:num <span id="L10" class="LineNr"> 10 </span>] <span id="L11" class="LineNr"> 11 </span><span class="traceContains">+mem: storing 34 in location 3</span> <span id="L12" class="LineNr"> 12 </span> @@ -390,7 +390,7 @@ if ('onhashchange' in window) { <span id="L326" class="LineNr">326 </span> <span class="Comment"># try to interactively add 2 and 2</span> <span id="L327" class="LineNr">327 </span> <span class="Constant">1</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [add <span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">2</span>] <span id="L328" class="LineNr">328 </span> <span class="Constant">2</span>:text<span class="Special"> <- </span>run-sandboxed <span class="Constant">1</span>:text -<span id="L329" class="LineNr">329 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">2</span>:text/lookup +<span id="L329" class="LineNr">329 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy *<span class="Constant">2</span>:text <span id="L330" class="LineNr">330 </span>] <span id="L331" class="LineNr">331 </span><span class="Comment"># first letter in the output should be '4' in unicode</span> <span id="L332" class="LineNr">332 </span><span class="traceContains">+mem: storing 52 in location 11</span> @@ -404,7 +404,7 @@ if ('onhashchange' in window) { <span id="L340" class="LineNr">340 </span> <span class="Conceal">¦</span> <span class="Normal">z</span>:text<span class="Special"> <- </span>append x:text<span class="Delimiter">,</span> y:text <span id="L341" class="LineNr">341 </span> ] <span id="L342" class="LineNr">342 </span> <span class="Constant">2</span>:text<span class="Special"> <- </span>run-sandboxed <span class="Constant">1</span>:text -<span id="L343" class="LineNr">343 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">2</span>:text/lookup +<span id="L343" class="LineNr">343 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy *<span class="Constant">2</span>:text <span id="L344" class="LineNr">344 </span>] <span id="L345" class="LineNr">345 </span><span class="Comment"># output contains "ab"</span> <span id="L346" class="LineNr">346 </span><span class="traceContains">+mem: storing 97 in location 11</span> @@ -416,7 +416,7 @@ if ('onhashchange' in window) { <span id="L352" class="LineNr">352 </span> <span class="Constant">1</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [x:num<span class="Special"> <- </span>copy <span class="Constant">34</span> <span id="L353" class="LineNr">353 </span>get x:num<span class="Delimiter">,</span> <span class="Constant">foo:offset</span>] <span id="L354" class="LineNr">354 </span> <span class="Constant">2</span>:text<span class="Delimiter">,</span> <span class="Constant">3</span>:text<span class="Special"> <- </span>run-sandboxed <span class="Constant">1</span>:text -<span id="L355" class="LineNr">355 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">3</span>:text/lookup +<span id="L355" class="LineNr">355 </span> <span class="Constant">10</span>:@:<span class="Normal">char</span><span class="Special"> <- </span>copy *<span class="Constant">3</span>:text <span id="L356" class="LineNr">356 </span>] <span id="L357" class="LineNr">357 </span><span class="Comment"># error should be "unknown element foo in container number"</span> <span id="L358" class="LineNr">358 </span><span class="traceContains">+mem: storing 117 in location 11</span> |