Link Search Menu Expand Document


Table of contents

  1. Built-in variables
    1. __file__
  2. Built-in functions
    1. print(…values)
    2. printError(…values)
    3. input(String: prompt -> Optional) -> String
    4. type(value) -> String
    5. assert(Boolean)
    6. isDefined(String) -> Boolean

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


Prints a given list of values to stderr.

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

input(String: prompt -> Optional) -> String

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: ");

type(value) -> String

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!

isDefined(String) -> Boolean

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.