diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-26 23:47:23 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-26 23:47:23 -0800 |
commit | d009e158803956c76adbf8f58a62884c3e7affb3 (patch) | |
tree | b88198e28d15cd1fc064f5300365a190decc4c50 /html/072array.mu.html | |
parent | 2da43c9462c7b7c1bb78d2f2826b3b97b4874973 (diff) | |
download | mu-d009e158803956c76adbf8f58a62884c3e7affb3.tar.gz |
2605
Diffstat (limited to 'html/072array.mu.html')
-rw-r--r-- | html/072array.mu.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/html/072array.mu.html b/html/072array.mu.html index e4ab32a8..61b5e14e 100644 --- a/html/072array.mu.html +++ b/html/072array.mu.html @@ -33,8 +33,8 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <pre id='vimCodeElement'> <span class="muScenario">scenario</span> array-from-args [ run [ - <span class="Constant">1</span>:address:array:character<span class="Special"> <- </span>new-array <span class="Constant">0</span>, <span class="Constant">1</span>, <span class="Constant">2</span> - <span class="Constant">2</span>:array:character<span class="Special"> <- </span>copy *<span class="Constant">1</span>:address:array:character + <span class="Constant">1</span>:address:shared:array:character<span class="Special"> <- </span>new-array <span class="Constant">0</span>, <span class="Constant">1</span>, <span class="Constant">2</span> + <span class="Constant">2</span>:array:character<span class="Special"> <- </span>copy *<span class="Constant">1</span>:address:shared:array:character ] memory-should-contain [ <span class="Constant">2</span><span class="Special"> <- </span><span class="Constant">3</span> <span class="Comment"># array length</span> @@ -45,7 +45,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } ] <span class="Comment"># create an array out of a list of scalar args</span> -<span class="muRecipe">recipe</span> new-array [ +<span class="muRecipe">recipe</span> new-array<span class="muRecipe"> -> </span>result:address:shared:array:character [ <span class="Constant">local-scope</span> capacity:number<span class="Special"> <- </span>copy <span class="Constant">0</span> <span class="Delimiter">{</span> @@ -55,7 +55,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } capacity<span class="Special"> <- </span>add capacity, <span class="Constant">1</span> <span class="muControl">loop</span> <span class="Delimiter">}</span> - result:address:array:character<span class="Special"> <- </span>new <span class="Constant">character:type</span>, capacity + result<span class="Special"> <- </span>new <span class="Constant">character:type</span>, capacity rewind-ingredients i:number<span class="Special"> <- </span>copy <span class="Constant">0</span> <span class="Delimiter">{</span> |