This commit is contained in:
Kartik Agaram 2020-01-31 16:17:04 -08:00
parent c2bec7a60f
commit 4bb0b7e93f
2 changed files with 1 additions and 10 deletions

View File

@ -59,16 +59,7 @@ When completed, it will be type- and memory-safe. At the moment it performs no
checks and only supports variables of type `int`. Here's the program we
translated above:
```
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
}
```
<img alt='ex2.mu' src='html/ex2.mu.png'>
There are no expressions, only statements that operate on variables. Most
statements in Mu translate to a single machine code instruction. Variables

BIN
html/ex2.mu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB