RuntypeScript

Global constants

Global constants are implicitly defined constant variables at the top-level scope.

const nil: nil                    // the nil type
const false: false                // the false type
const true: true                  // the true type
const boolean: boolean            // the boolean type
const string: string              // the string type
const number: number              // the number type
const any: any                    // the any type
const nan: number                 // not a number
const inf: number                 // positive infinity
const pi: number                  // pi constant
const tau: number                 // tau constant (2 * pi)
const e: number                   // Euler's number
const print: sig (any) nil        // prints to stdout
const println: sig (any) nil      // prints to stdout and appends a line feed
const to_string: sig (any) string // converts every type to string
const sqrt: sig (number) number   // square root
const panic: sig (string) nil     // terminates the program with a runtime error