💾 Archived View for auragem.space › odin captured on 2022-04-29 at 11:14:10. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
The Odin programming language is designed with the intent of creating an alternative to C with the following goals:
package main import "core:fmt" main :: proc() { program := "+ + * 😃 - /"; accumulator := 0; for token in program { switch token { case '+': accumulator += 1; case '-': accumulator -= 1; case '*': accumulator *= 2; case '/': accumulator /= 2; case '😃': accumulator *= accumulator; case: // Ignore everything else } } fmt.printf("The program \"%s\" calculates the value %d\n", program, accumulator); }