Keywords & Operators

Complete list of Tenet keywords and operators.


Keywords

KeywordCategoryDescription
andLogicLogical AND (short-circuit)
classOOPClass declaration
elseControlElse branch
falseLiteralBoolean false
forControlFor loop
funFunctionsFunction declaration
gameDSLGame definition
ifControlConditional
nilLiteralNull/absent value
orLogicLogical OR (short-circuit)
payoffDSLPayoff matrix block
playersDSLPlayer declaration
printI/OOutput statement
returnFunctionsReturn from function
solveDSLAnalyze game
strategiesDSLStrategy declaration
superOOPSuperclass reference
thisOOPInstance reference
trueLiteralBoolean true
usingDSLSolve algorithm selector
varVariablesVariable declaration
whileControlWhile loop

Total: 22 keywords


Operators

Arithmetic

OperatorDescriptionExample
+Addition3 + 47
-Subtraction10 - 37
*Multiplication5 * 630
/Division20 / 45
- (unary)Negation-5

Comparison

OperatorDescription
==Equal to
!=Not equal to
<Less than
<=Less than or equal
>Greater than
>=Greater than or equal

Logical

OperatorDescription
andLogical AND
orLogical OR
!Logical NOT

Punctuation

Single-Character

(  )  {  }  ,  .  -  +  ;  /  *  :

One or Two Character

!   !=
=   ==
>   >=
<   <=

Next Steps