- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Standard Library
Welcome to the documentation for the standard library of ShortLang. This concise yet powerful language comes equipped with a range of functions to enhance your coding experience. Below are all the built-in functions you might need.
Prints to stdout with a newline at the end.
Prints to stdout without a newline at the end.
Returns the absolute value of A.
Returns the command-line arguments given to the program.
Rounds up to the next integer.
Returns the ascii value of A.
- Gets all the environment variables as an array of key-value pairs.
- Gets the value of the specified environment variable.
- Sets the value of the specified environment variable.
- Terminates the program with exit code 0.
- Terminates the program with the specified exit code.
Returns the nth fibonacci number.
Rounds down to the previous integer.
Tries to convert A to a float, returns an error if it fails.
Returns the greatest common divisor of A and B.
- Read a line from stdin.
- Read a line from stdin, with a prompt.
Tries to convert A to an integer, returns an error if it fails.
Checks whether A is a prime.
Returns the least common multiple of A and B.
Returns the length of A.
Finds the previous prime number.
Finds the next prime number.
Opens a file.
Returns the character associated with the ascii value of A.
Returns the nth prime number.
- Returns a random number.
- Returns a random number between 0 and A.
- Returns a random number between A and B.
- Returns an array with values from 0 to A.
- Returns an array with values from A to B.
Calculates the nth root of A.
- Rounds to the nearest integer.
- Rounds to the specified precision.
Executes a shell command.
Calculates the square root of A.
Converts a value to a string.
Returns the type of A.
- Removes all the elements from the array or string.
- Flattens an array a single value string, placing a given separator between each element.
- Finds the largest element in the array.
- Finds the smallest element in the array.
- Calculates the product of all the values of the array.
- Pops the last element and returns it.
- Pushes a value to the end of the array or string.
- Sorts the array.
- Subtracts all the elements from the first one.
- Calculates the sum of all the values inside an array.
- Returns the value type.
- Returns the value type.
- Appends the contents to the file.
- Reads everything from the file.
- Returns the value type.
- Writes the contents to the file.
- Computes the cosine.
- Computes the cotangent.
- Computes the cosecant.
- Computes the secant.
- Computes the sine.
- Computes the tangent.
- Returns the value type.
- Computes the cosine.
- Computes the cotangent.
- Computes the cosecant.
- Computes the secant.
- Computes the sine.
- Computes the tangent.
- Returns the value type.
- Returns the value type.
- Removes all the elements from the array or string.
- Pops the last element and returns it.
- Pushes a value to the end of the array or string.
- Returns an array containing the substrings of a string, separated by specified character.
- Returns the value type.