Declaration Statements
Declaration statements are the statements that can be used in the global scopes.
Global Statements
These are the statements can be used in the global scope to declare symbols such as variables, structs and functions.
| Keyword | Description | Link |
|---|---|---|
| import | Imports another kasl program. | Import |
| typealias | Names the specific type. | Typealias |
| func | Defines a function. | Function |
| input | Defines an input. | Input |
| output | Defines an output variable. | Output |
| state | Defines a state variable. | State |
| let | Defines a global constant. | Let |
| struct | Defines a struct. | Struct |
| operator infix / prefix / postfix | Defines the precedence and the associativity for the operator. | Operator Definition |
| func infix / prefix / postfix | Declares the implementation of an operator for the specific operand types. | Operator Function |
Struct Statements
Below are the statements can be used inside struct declarations.
| Keyword | Description | Link |
|---|---|---|
| var | Defines a struct field. | Struct Field |
| func | Defines a member function for the struct. | Function |