7936ad5c ^
1 pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .h# Add two numbers, and return the result in the exit code. # # To run: # $ ./translate_mu apps/ex2.mu # $ ./a.elf # Expected result: # $ echo $? # 7 fn main -> result/ebx: int { result <- do-add 3 4 } fn do-add a: int, b: int -> result/ebx: int { result <- copy a result <- add b }
# Add two numbers, and return the result in the exit code. # # To run: # $ ./translate_mu apps/ex2.mu # $ ./a.elf # Expected result: # $ echo $? # 7 fn main -> result/ebx: int { result <- do-add 3 4 } fn do-add a: int, b: int -> result/ebx: int { result <- copy a result <- add b }