about summary refs log blame commit diff stats
path: root/html/059to_text.mu.html
blob: 9f51fded27a42ace1a552ef5927d90e1825e1dda (plain) (tree)
span class="muRecipe"> -&gt; </span>y:text [ <span id="L17" class="LineNr">17 </span> <span class="Constant">local-scope</span> <span id="L18" class="LineNr">18 </span> <span class="Constant">load-ingredients</span> <span id="L19" class="LineNr">19 </span> y <span class="Special">&lt;-</span> to-text *x <span id="L20" class="LineNr">20 </span>] <span id="L21" class="LineNr">21 </span> <span id="L22" class="LineNr">22 </span><span class="muScenario">scenario</span> to-text-line-early-warning-for-static-dispatch [ <span id="L23" class="LineNr">23 </span> x:text <span class="Special">&lt;-</span> to-text-line<span class="Constant"> 34</span> <span id="L24" class="LineNr">24 </span> <span class="Comment"># just ensure there were no errors</span> <span id="L25" class="LineNr">25 </span>] <span id="L26" class="LineNr">26 </span> <span id="L27" class="LineNr">27 </span><span class="muScenario">scenario</span> array-to-text-line-early-warning-for-static-dispatch [ <span id="L28" class="LineNr">28 </span> n:&amp;:@:num <span class="Special">&lt;-</span> new <span class="Constant">number:type</span>,<span class="Constant"> 3</span> <span id="L29" class="LineNr">29 </span> x:text <span class="Special">&lt;-</span> <a href='059to_text.mu.html#L16'>array-to-text-line</a> n <span id="L30" class="LineNr">30 </span> <span class="Comment"># just ensure there were no errors</span> <span id="L31" class="LineNr">31 </span>] <span id="L32" class="LineNr">32 </span> <span id="L33" class="LineNr">33 </span><span class="Comment"># finally, a specialization for single characters</span> <span id="L34" class="LineNr">34 </span><span class="muRecipe">def</span> to-text c:char<span class="muRecipe"> -&gt; </span>y:text [ <span id="L35" class="LineNr">35 </span> <span class="Constant">local-scope</span> <span id="L36" class="LineNr">36 </span> <span class="Constant">load-ingredients</span> <span id="L37" class="LineNr">37 </span> y <span class="Special">&lt;-</span> new <span class="Constant">character:type</span>, <span class="Constant">1/capacity</span> <span id="L38" class="LineNr">38 </span> *y <span class="Special">&lt;-</span> put-index *y,<span class="Constant"> 0</span>, c <span id="L39" class="LineNr">39 </span>] <span id="L40" class="LineNr">40 </span> <span id="L41" class="LineNr">41 </span><span class="muScenario">scenario</span> character-to-text [ <span id="L42" class="LineNr">42 </span> 1:char <span class="Special">&lt;-</span> copy <span class="Constant">111/o</span> <span id="L43" class="LineNr">43 </span> 2:text <span class="Special">&lt;-</span> to-text 1:char <span id="L44" class="LineNr">44 </span> 3:@:char <span class="Special">&lt;-</span> copy *2:text <span id="L45" class="LineNr">45 </span> memory-should-contain [ <span id="L46" class="LineNr">46 </span> <span class="Conceal">¦</span> 3:array:character <span class="Special">&lt;-</span> <span class="Constant">[o]</span> <span id="L47" class="LineNr">47 </span> ] <span id="L48" class="LineNr">48 </span>] </pre> </body> </html> <!-- vim: set foldmethod=manual : -->