SwaziLang Reference: Keywords
SwaziLang uses a set of reserved keywords for its syntax, control flow, modules, classes, and more.
These keywords have special meaning—you cannot use them as variable or function names!
Keywords Table
| Keyword | Meaning / Use |
|---|---|
| data | Declare variable |
| chapisha | Print/output |
| andika | Write/output (alternate) |
| thabiti | Constant modifier |
| kazi | Function/method definition |
| tabia | Method (in object/class) |
| chagua | Switch statement |
| ikiwa | Switch case |
| kaida | Switch default |
| rudisha | Return value |
| kweli | Boolean true |
| sikweli | Boolean false |
| na | Logical AND |
| ni | Logical IS |
| au | Logical OR |
| si | Logical NOT |
| sawa | Equality comparison |
| sisawa | Not equal comparison |
| tumia | Import module |
| kutoka | Import module (from) |
| ruhusu | Export module |
| muundo | Class/struct definition |
| rithi | Inheritance |
| unda | Create instance/object |
| supa | Superclass constructor call |
| futa | Destructor/destroy instance |
| kama | If conditional |
| vinginevyo | Else conditional |
| jaribu | Try/catch block |
| makosa | Error/throw |
| kisha | Finally block |
| kwa | For loop |
| kila | For-each loop |
| katika | In/within (for-each) |
| wakati | While loop |
| fanya | Do/while loop or block |
| simama | Break out of loop/switch |
| endelea | Continue loop |
| null | Null/empty value |
Notes
- Always use keywords as intended—they cannot be redefined or used as variable/function names.
- Some keywords have alternate meanings depending on context (e.g.
kamain control flow,kamain module import). - For full details and usage, see the specific documentation sections.
Tip:
Refer to this table whenever you’re unsure if a word is reserved or available for naming!