Skip to content

The Core Standard Library

C272 edited this page Aug 24, 2019 · 12 revisions

The contents of this library are automatically imported into Algo on runtime. You can call all of these without using any import statements. Don't try and import this library, as it will throw an error.


terminate(exitCode)

Terminates the running Algo program, given an exit code. '0' is considered a successful execution of the program, '-1' is considered a failure. This follows C# exit code guidelines.

Parameters:

Name Description
exitCode The exit code to assign to the program upon termination.

Usage:

//kill the program off.
terminate(0);

len(x)

Returns the length of the string or list passed in.

Parameters:

Name Description
x The item to return the length of.

Usage:

let x = [1, 2, 3];
print len(x); //3

let y = "string";
print len(y); //6

The string library

The entire string library is automatically imported in core. To see documentation for string manipulation, click here.

Standard Library Documentation:

Clone this wiki locally