Keywords & Operators
Complete list of Tenet keywords and operators.
Keywords
| Keyword | Category | Description |
|---|---|---|
and | Logic | Logical AND (short-circuit) |
class | OOP | Class declaration |
else | Control | Else branch |
false | Literal | Boolean false |
for | Control | For loop |
fun | Functions | Function declaration |
game | DSL | Game definition |
if | Control | Conditional |
nil | Literal | Null/absent value |
or | Logic | Logical OR (short-circuit) |
payoff | DSL | Payoff matrix block |
players | DSL | Player declaration |
print | I/O | Output statement |
return | Functions | Return from function |
solve | DSL | Analyze game |
strategies | DSL | Strategy declaration |
super | OOP | Superclass reference |
this | OOP | Instance reference |
true | Literal | Boolean true |
using | DSL | Solve algorithm selector |
var | Variables | Variable declaration |
while | Control | While loop |
Total: 22 keywords
Operators
Arithmetic
| Operator | Description | Example |
|---|---|---|
+ | Addition | 3 + 4 → 7 |
- | Subtraction | 10 - 3 → 7 |
* | Multiplication | 5 * 6 → 30 |
/ | Division | 20 / 4 → 5 |
- (unary) | Negation | -5 |
Comparison
| Operator | Description |
|---|---|
== | Equal to |
!= | Not equal to |
< | Less than |
<= | Less than or equal |
> | Greater than |
>= | Greater than or equal |
Logical
| Operator | Description |
|---|---|
and | Logical AND |
or | Logical OR |
! | Logical NOT |
Punctuation
Single-Character
( ) { } , . - + ; / * :
One or Two Character
! !=
= ==
> >=
< <=
Next Steps
- Reserved Words → — Words you cannot use as identifiers