Reference

This is a full reference of all objects in the standard libraries of Runtime

StandardLibrary
Objects
carg0-... v.0.10.0

Command line arguments:

  • carg0: always the Runtime executable.
  • carg1: always the Runtime script being run.
  • carg2...: the rest of the arguments supplied.


Functions
Return ( object (eval=false) ) v.<0.9.6
Returns object

Returns the first argument. This function may be removed later.

Print ( args... (eval=true) ) v.<0.9.6
Returns 1 (True)

Prints all args to the standard output.

Input ( ) v.<0.9.6
Returns Input

Retrieves a single line from the standard input.

Object ( object (eval=false), members... (eval=false) ) v.<0.9.6
Returns Success (1) or exception

Adds all members to object. Members are added via incrementing int keys.

Assign ( object (eval=false), key (eval=true), member (eval=true) ) v.<0.9.6
Returns Success (1) or exception

Assigns member to object at key.

Exit ( code (eval=true) ) v.<0.9.6
Returns Nothing

Exits Runtime. Exit code can be specified, default is 0.

Include ( files... (eval=true) ) v.<0.9.6
Returns Success (1) or exception

Runs a Runtime file, and adds its members to the current scope.

If ( condition (eval=true), if clause (eval=true), else clause (eval=true) ) v.<0.9.6
Returns Success or triggered clause

Conditional evaluation based on condition. Else clause is optional.

While ( condition (eval=true), statements... (eval=true) ) v.<0.9.6
Returns Success (1) or exception

Repeatedly evaluates a series of statements, as long as a conditional is true. Despite evaluation, the value of the conditional is not written down.

Not ( boolean (eval=true) ) v.<0.9.6
Returns Boolean (1/0) or exception

Inverts the value of a boolean.

Format ( format string (eval=true), objects... (eval=true) ) v.0.9.8
Returns Resulting string or exception

String interpolation: characters can be escaped, and non-escaped instances of $ will be replaced with objects given to this function.

StandardMath
Functions
Add ( numbers... (eval=true) ) v.<0.9.6
Returns Result

Adds all arguments together and returns the result.

Minus ( numbers... (eval=true) ) v.<0.9.6
Returns Result

Negates all arguments from the first one and returns the result.

Multiply ( numbers... (eval=true) ) v.<0.9.6
Returns Result

Multiplies all arguments with the first one and returns the result.

Divide ( numbers... (eval=true) ) v.<0.9.6
Returns Result

Divides all arguments from the first one and returns the result.

Mod ( numbers... (eval=true) ) v.<0.9.6
Returns Result

Applies modulo from all arguments against the first one and returns the result.

Equal ( value1 (eval=true), value2 (eval=true) ) v.<0.9.6
Returns Matching (1/0)

Compares values and returns whether or not they match. Not limited to numbers; works for strings as well.

LargerThan ( value1 (eval=true), value2 (eval=true) ) v.<0.9.6
Returns Result

Returns whether or not value1 is larger than value2.

SmallerThan ( value1 (eval=true), value2 (eval=true) ) v.<0.9.6
Returns Result

Returns whether or not value1 is smaller than value2.

Sine ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the sine of value. This maps directly to the C++ function.

Cosine ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the cosine of value. This maps directly to the C++ function.

Tangent ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the tangent of value. This maps directly to the C++ function.

ArcCosine ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the arccosine of value. This maps directly to the C++ function.

ArcSine ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the arcsine of value. This maps directly to the C++ function.

ArcTangent ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the arctangent of value. This maps directly to the C++ function.

ArcTangent2 ( x (eval=true), y (eval=true) ) v.<0.9.6
Returns Result

Returns the atan2 of two values. This maps directly to the C++ function.

Power ( base (eval=true), exponent (eval=true) ) v.<0.9.6
Returns Result

Returns the power of two values. This maps directly to the C++ function.

SquareRoot ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the square root of value. This maps directly to the C++ function.

Floor ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the floor of value. This maps directly to the C++ function.

Ceiling ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the ceiling of value. This maps directly to the C++ function.

Round ( value (eval=true) ) v.<0.9.6
Returns Result

Returns value rounded. This maps directly to the C++ function.

NaturalLogarithm ( value (eval=true) ) v.<0.9.6
Returns Result

Returns the natural logarithm of value. This maps directly to the C++ function.

RandomInteger() ( ) v.0.10.0
Returns Random integer

Returns a random number between 0 and the integer limit.

RandomDecimal() ( ) v.0.10.0
Returns Random decimal

Returns a random number between 0 and 1.

StandardIO
Objects
file v.0.10.0

Members

  • path

    The path of the file

  • open

    Whether or not the site is open

  • pointer

    The location of the read/write pointer

Functions
FileCreate ( file object (eval=false), file path (eval=true) ) v.0.10.0
Returns Success (1) or exception

Creates a file object.

FileOpen ( file object (eval=false) ) v.0.10.0
Returns Success (1) or exception

Opens file object.

FileClose ( file object (eval=false) ) v.0.10.0
Returns Success (1) or exception

Closes file object.

FileReadLine ( file object (eval=false) ) v.0.10.0
Returns Line or exception

Reads a single line from file object.

FileRead ( file object (eval=false), data amount (eval=true) ) v.0.10.0
Returns Data or exception

Reads a specified amount of data from file object.

FileWrite ( file object (eval=false), text (eval=true) ) v.0.10.0
Returns Success (1) or exception

Writes text to file object.

FileAppendLine ( file object (eval=false), text (eval=true) ) v.0.10.0
Returns Success (1) or exception

Writes text to the end of file object.

About Runtime
Who?
What?
Why?
Documentation
Installation
Getting started
Reference
Download
Binaries
Source
Contact
Github
Other socials
This page is licensed under the CC0-1.0 license. You are free to use the source code of this site however you want, even without any attribution. The source code is available at my Github