Add print built-in function

This commit is contained in:
Teascade 2017-08-27 21:41:40 +00:00
parent f40b722f94
commit 992c7b6009
1 changed files with 8 additions and 1 deletions

View File

@ -35,6 +35,7 @@ Table of contents for the Omega spec
- [Values](#values)
- [Special cases](#special-cases)
- [Keywords](#keywords)
- [Built-in functions](#built-in-functions)
## Examples
Before any of the following examples, a print-function has been defined in the global scope. The print-function takes in a String-type as a parameter.
@ -455,4 +456,10 @@ if (int_opt?) {
- Before `as` there must be a variable, or a value, and after there must be the type which the value is attempted to be cast as.
- If the rightside of the operator is not a type, a parse§ time error occurs.
.
## Built-in functions
- [`print(text: string)`](#print-text-string)
#### `print(text: string)`
Prints `text` to standard (stdout, to console by default). This is configurable by changing stdout in the Omega VM.