This document provides an overview of the built-in functions available in the AIScript VM.
Returns the absolute value of a number.
Parameters:
Return Type: Number
Example:
Returns true
if all elements of the array are true.
Parameters:
Return Type: Boolean
Example:
Returns true
if any element of the array is true.
Parameters:
Return Type: Boolean
Example:
Converts a value to its ASCII representation.
Parameters:
Return Type: String
Example:
Converts a number to its binary representation.
Parameters:
Return Type: String
Example:
Converts a value to a boolean.
Parameters:
Return Type: Boolean
Example:
Checks if a value is callable.
Parameters:
Return Type: Boolean
Example:
Converts an ASCII code to its character representation.
Parameters:
Return Type: String
Example:
Filters elements of an array based on a predicate function.
Parameters:
Return Type: Array
Example:
Converts a value to a floating-point number.
Parameters:
Return Type: Number
Example:
Formats a string using placeholders.
Parameters:
Return Type: String
Example:
Converts a number to its hexadecimal representation.
Parameters:
Return Type: String
Example:
Reads a line of input from the user.
Parameters:
Return Type: String
Example:
Converts a value to an integer.
Parameters:
Return Type: Number
Example:
Returns the length of a string, array, or object.
Parameters:
Return Type: Number
Example:
Applies a function to each element of an array.
Parameters:
Return Type: Array
Example:
Returns the maximum value from a list of numbers or an array.
Parameters:
Return Type: Number
Example:
Returns the minimum value from a list of numbers or an array.
Parameters:
Return Type: Number
Example:
Converts a number to its octal representation.
Parameters:
Return Type: String
Example:
Returns the ASCII code of a character.
Parameters:
Return Type: Number
Example:
Prints a value to the console.
Parameters:
Return Type: nil
Example:
Rounds a number to the nearest integer.
Parameters:
Return Type: Number
Example:
Converts a value to a string.
Parameters:
Return Type: String
Example:
Returns the sum of elements in an array.
Parameters:
Return Type: Number
Example:
Combines multiple arrays into a single array of tuples.
Parameters:
Return Type: Array
Example: