Raingoer is a simple interpreted language made because i was bored lmfao
func add x y
set result to x + y
return result
endset x to 42
set name to "Alice"
set sum to a + bloop 5
state [add 1 2]
endreturn x * 2add 5 3Use brackets to evaluate a function call as an expression:
set result to [add 2 3]
state [add 10 20]-
state [expression]— Prints the result of evaluating the expression.Example:
state [add 5 3] state [fib 10] state [ask "how are you? "]
| Operator | Description | Example | Result |
|---|---|---|---|
| + | Addition | 1 + 2 | 3 |
| - | Subtraction | 5 - 3 | 2 |
| * | Multiplication | 4 * 2 | 8 |
| / | Division | 8 / 2 | 4 |
| Operator | Description | Example | Result |
|---|---|---|---|
| == | Equal | 2 == 2 | true |
| != | Not equal | 2 != 3 | true |
| < | Less than | 1 < 2 | true |
| > | Greater than | 3 > 2 | true |
| <= | Less or equal | 2 <= 2 | true |
| >= | Greater/equal | 3 >= 2 | true |
func fib v
set a to 0
set b to 1
set c to 0
loop v
set c to a + b
set a to b
set b to c
end
return c
end
loop 1000
fib 1000
endfunc add x y
set result to x + y
return result
end
state [add 5 3]- Functions with parameters and return values
- Variable assignment and arithmetic
- Loops
- Bracket-based function evaluation
- Built-in
statefor output
MIT