Cylium Language

Built-in Functions and Constants

Language version: 0.6.0

Built-in constants

Name Type Value
PI float 3.14159265358979323846
E float 2.71828182845904523536
IS_LINUX bool Platform constant
IS_MACOS bool Platform constant
IS_WINDOWS bool Platform constant
IS_X86_64 bool Architecture constant
IS_ARM64 bool Architecture constant

Built-in functions

Name Arguments type Return type Description
input() string Reads a line from standard input.
sin(x) float float Returns the sine of x (in radians).
cos(x) float float Returns the cosine of x (in radians).
sqrt(x) float float Returns the square root of x. Causes a runtime error if x is negative.
shell(command) string int Executes a shell command and returns its exit code.
unix_time() int Returns the current Unix timestamp (seconds since January 1, 1970 UTC).
sleep(milliseconds) int void Suspends execution for the specified number of milliseconds.
len(array) array<T> int Returns the number of elements in an array.

Article by the language author - Ztry8 (AslanD)

Licensed under Apache License 2.0