diff options
-rw-r--r-- | apps/factorial.mu | 4 | ||||
-rw-r--r-- | html/apps/factorial.mu.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu index b477190d..5cd8c510 100644 --- a/apps/factorial.mu +++ b/apps/factorial.mu @@ -12,7 +12,7 @@ # Compare apps/factorial4.subx fn factorial n: int -> result/eax: int { - compare n 1 + compare n, 1 { break-if-> # n <= 1; return 1 @@ -30,7 +30,7 @@ fn factorial n: int -> result/eax: int { fn test-factorial { var result/eax: int <- factorial 5 - check-ints-equal result 0x78 "F - test-factorial" + check-ints-equal result, 0x78, "F - test-factorial" } fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { diff --git a/html/apps/factorial.mu.html b/html/apps/factorial.mu.html index c52b1198..958139cf 100644 --- a/html/apps/factorial.mu.html +++ b/html/apps/factorial.mu.html @@ -71,7 +71,7 @@ if ('onhashchange' in window) { <span id="L12" class="LineNr">12 </span><span class="muComment"># Compare apps/factorial4.subx</span> <span id="L13" class="LineNr">13 </span> <span id="L14" class="LineNr">14 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='factorial.mu.html#L14'>factorial</a></span> n: int<span class="PreProc"> -> </span>result/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L15" class="LineNr">15 </span> compare n <span class="Constant">1</span> +<span id="L15" class="LineNr">15 </span> compare n, <span class="Constant">1</span> <span id="L16" class="LineNr">16 </span> <span class="Delimiter">{</span> <span id="L17" class="LineNr">17 </span> <span class="PreProc">break-if-></span> <span id="L18" class="LineNr">18 </span> <span class="muComment"># n <= 1; return 1</span> @@ -89,7 +89,7 @@ if ('onhashchange' in window) { <span id="L30" class="LineNr">30 </span> <span id="L31" class="LineNr">31 </span><span class="PreProc">fn</span> <span class="muTest"><a href='factorial.mu.html#L31'>test-factorial</a></span> <span class="Delimiter">{</span> <span id="L32" class="LineNr">32 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='factorial.mu.html#L14'>factorial</a> <span class="Constant">5</span> -<span id="L33" class="LineNr">33 </span> <a href='../102test.subx.html#L23'>check-ints-equal</a> result <span class="Constant">0x78</span> <span class="Constant">"F - test-factorial"</span> +<span id="L33" class="LineNr">33 </span> <a href='../102test.subx.html#L23'>check-ints-equal</a> result, <span class="Constant">0x78</span>, <span class="Constant">"F - test-factorial"</span> <span id="L34" class="LineNr">34 </span><span class="Delimiter">}</span> <span id="L35" class="LineNr">35 </span> <span id="L36" class="LineNr">36 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='factorial.mu.html#L36'>main</a></span> args-on-stack: (addr array (addr array byte))<span class="PreProc"> -> </span>exit-status/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span> |