💾 Archived View for auragem.space › odin captured on 2021-11-30 at 20:18:30. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
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); }