Revert demo.odin

This commit is contained in:
Ginger Bill
2017-05-09 10:01:50 +01:00
parent 64b5afd820
commit 5595daf5a3

View File

@@ -1,3 +1,18 @@
#import "fmt.odin";
main :: proc() {
/*
immutable program := "+ + * - /";
accumulator := 0;
for token in program {
match token {
case '+': accumulator += 1;
case '-': accumulator -= 1;
case '*': accumulator *= 2;
case '/': accumulator /= 2;
default: // Ignore everything else
}
}
fmt.printf("The program \"%s\" calculates the value %d\n", program, accumulator);
}