Rune Language
Reference

Built-in Functions

Reference documentation for standard library built-ins.

Rune includes a small set of built-in functions that are globally available without importing.


Function Reference

FunctionArgument(s)Return TypeDescription
write(...)Zero or more valuesemptyPrints arguments separated by spaces, followed by a newline, to standard output.
input(prompt)prompt (optional word)wordReads a line of text from standard input and returns it.
type(val)Any valuewordReturns a string representation of the value's type ("number", "word", "boolean", "empty").
length(val)WordnumberReturns the character count of the word. Raises runtime error for non-words.
number(val)Any valuenumberConverts value to a number. Word strings must be parseable. Booleans convert to 1 (yes) or 0 (no).
word(val)Any valuewordConverts a value to its string representation.

Examples

Converting Types

set user_input = input("Enter score: ")
set numeric_score = number(user_input)
write("Double score is: ", numeric_score * 2)

Checking Types

set x = yes
write(type(x)) # boolean