Link Search Menu Expand Document


Table of contents

  1. Built-in variables
    1. __file__
  2. Built-in functions
    1. print(…values…)
    2. input(string: prompt -> optional)
    3. type(value)
    4. assert(boolean)
    5. isDefined(string)

Built-in variables


The path name of the compilation unit.

Built-in functions

Global functions which are built into Dictu.


Prints a given list of values to stdout.

print(10); // 10
print("test"); // "test"
print(10, "test", nil, true); // 10, "test", nil, true

input(string: prompt -> optional)

Gathers user input from stdin and returns the value as a string. input() has an optional prompt which will be shown to the user before they enter their string.

input("Input: ");


Returns the type of a given value as a string.

type(10); // "number"
type(true); // "bool"
type([]); // "list"


Raise a runtime error if the given boolean is not true.

assert(10 > 9);
assert(9 > 10); // assert() was false!


Returns a boolean depending on whether a variable has been defined in the global scope.

isDefined("isDefined"); // true
isDefined("garbage value"); // false

This site uses Just The Docs, with modifications.