diff options
Diffstat (limited to 'html/059to_text.mu.html')
-rw-r--r-- | html/059to_text.mu.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/html/059to_text.mu.html b/html/059to_text.mu.html index baeb650e..f136c203 100644 --- a/html/059to_text.mu.html +++ b/html/059to_text.mu.html @@ -40,24 +40,24 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="muRecipe">def</span> to-text-line x:_elem<span class="muRecipe"> -> </span>y:text [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> - y<span class="Special"> <- </span>to-text x + y <span class="Special"><-</span> to-text x ] <span class="Comment"># variant for arrays (since we can't pass them around otherwise)</span> <span class="muRecipe">def</span> array-to-text-line x:&:@:_elem<span class="muRecipe"> -> </span>y:text [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> - y<span class="Special"> <- </span>to-text *x + y <span class="Special"><-</span> to-text *x ] <span class="muScenario">scenario</span> to-text-line-early-warning-for-static-dispatch [ - x:text<span class="Special"> <- </span>to-text-line <span class="Constant">34</span> + x:text <span class="Special"><-</span> to-text-line<span class="Constant"> 34</span> <span class="Comment"># just ensure there were no errors</span> ] <span class="muScenario">scenario</span> array-to-text-line-early-warning-for-static-dispatch [ - n:&:@:num<span class="Special"> <- </span>new <span class="Constant">number:type</span>, <span class="Constant">3</span> - x:text<span class="Special"> <- </span>array-to-text-line n + n:&:@:num <span class="Special"><-</span> new <span class="Constant">number:type</span>,<span class="Constant"> 3</span> + x:text <span class="Special"><-</span> array-to-text-line n <span class="Comment"># just ensure there were no errors</span> ] @@ -65,16 +65,16 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="muRecipe">def</span> to-text c:char<span class="muRecipe"> -> </span>y:text [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> - y<span class="Special"> <- </span>new <span class="Constant">character:type</span>, <span class="Constant">1/capacity</span> - *y<span class="Special"> <- </span>put-index *y, <span class="Constant">0</span>, c + y <span class="Special"><-</span> new <span class="Constant">character:type</span>, <span class="Constant">1/capacity</span> + *y <span class="Special"><-</span> put-index *y,<span class="Constant"> 0</span>, c ] <span class="muScenario">scenario</span> character-to-text [ - <span class="Constant">1</span>:char<span class="Special"> <- </span>copy <span class="Constant">111/o</span> - <span class="Constant">2</span>:text<span class="Special"> <- </span>to-text <span class="Constant">1</span>:char - <span class="Constant">3</span>:@:char<span class="Special"> <- </span>copy *<span class="Constant">2</span>:text + 1:char <span class="Special"><-</span> copy <span class="Constant">111/o</span> + 2:text <span class="Special"><-</span> to-text 1:char + 3:@:char <span class="Special"><-</span> copy *2:text memory-should-contain [ - <span class="Constant">3</span>:array:character<span class="Special"> <- </span><span class="Constant">[o]</span> + 3:array:character <span class="Special"><-</span> <span class="Constant">[o]</span> ] ] </pre> |