Builtin functions are defined by the interpreter. A list of built-in functions is given below
| Function | Syntax | Description |
| print | print(toprint1,...) | Prints all given arguments |
| println | println(toprint1,...) | Same as print but also prints newline after printing all arguments |
| format | format(formatstr,arg1, ...) | Formats the given string and returns a new string. It replaces all '%' characters in formatstr with given arguments. |
| printf | printf(formatstr,arg1, ...) | Prints the formatted string instead of returning it. |
| reverse | reverse(s) | Returns the reverse of string or reverses a list inplace and returns nil |
| split | split(str,delim) | Returns a list of strings by splitting the passed string at specified delimeter |
| shuffle | shuffle(x) | Shuffles a list |
| getenv | getenv(s) | Returns the value of an environment variable. Returns nil on failure |
| len | len(s) | Returns the length of string,list or dictionary |
| input | input(prompt = "") | Takes string input from user and returns it. The prompt is optional and empty string by default |
| find | find(x,s) | Finds and returns the starting index of string x in s. Returns nil if no occurrence is found |
| replace | replace(x,y,s) | Replaces all occurrences of x with y in string s |
| replace_once | replace(x,y,s) | Replaces only first occurrence |
| str | str(x) | Converts x to string and returns it. Throws error if conversion is not possible |
| int | int(x) | Converts x to integer and returns it. The result can be int32 or int64. Throws error if conversion is not possible |
| int32 | int32(x) | Converts x to integer 32 bit and returns it. The result is always int32. Throws error if conversion is not possible |
| int64 | int64(x) | Converts x to integer 64 bit and returns it. The result is always int64. Throws error if conversion is not possible |
| float | float(x) | Converts x to float and returns it. Throws error if conversion is not possible |
| tonumeric | tonumeric(s) | Converts string to a numeric type(float or integer) if possible otherwise throws an error |
| isnumeric | isnumeric(s) | Returns true if a string can be convert to numeric type |
| open | open(filename, mode) | Opens a file in specified mode and returns a file object. Throws error if file cannot be opened |
| read | read(file) | Reads and returns file data as string. |
| close | close(file) | Closes the file |
| readlines | readlines(file) | Returns a list of strings containing lines read from the file |
| writelines | writelines(lines, file) | Writes a list of lines to the file |
| write | write(data, file) | Writes a string to the file |
| fread | fread(n, file) | Reads n bytes from the file |
| fwrite | fwrite(bytes, file) | Writes given bytes to the file |
| fseek | fseek(file, n, whence) | Seeks the filestream n bytes relative to whence |
| sleep | sleep(x) | Sleeps for x milliseconds |
| substr | substr(x,y,str) | Returns substring of str starting from index x to index y |
| clone | clone(x) | Makes a deep copy of a list or dictionary |
| system | system(s) | Executes a system command and returns the exit code |
| pow | pow(x,y) | Returns x raised to the power y |
| exit | exit(retcode = 0) | Exits program returning retcode. |