Documentation
Keywords
The following table summarizes the keywords of contrap:
| Keyword | Occurrence | Description |
|---|---|---|
| abort | abort(a) | Terminates the execution of a function with error message ''a'' |
| break | break | Interrupts a loop and jumps to the next command after the loop |
| clear | clear(), clear(a) | Restarts the engine or clears the contents of the identifier ''a'' |
| error | error(a) | Terminates the execution of the code with exception ''a'' |
| if | if(condition) true-case else else-case | Conditional branch |
| for | for(init;condition;increment) body | For loop |
| function | function(...,argumenti:Typei=Defaulti,...):Type where condition body | Atomic function definition |
| load | load(a) | Loads a library with the string-name ''a'' |
| local | local a := b | Declares a to be a local variable |
| operator | operatora | Reference to the operator ''a'' |
| return | return(a) | Returns from a function with ''a'' |
| type | type(a) | Returns the type name of ''a'' as a string |
| quit | quit | Closes the engine and exits the application |
| quote | quote(a), 'a' | Evaluation removes the quotes but ''a'' is not evaluated. |
| while | while(condition) body | While loop |
| where | function(...,argumenti:Typei=Defaulti,...):Type where condition body | Calling condition of a function |
