-
Notifications
You must be signed in to change notification settings - Fork 1
Native Functions
Appends the content of the second argument to the file located at the path specified with the first argument
append_to_file("D:/docs/test.txt", "Hello File!");
Reads the content of a file and stores it in a cellox string
var file = read_file("D:/docs/test.txt");
Reads the next line of characters from the standard input stream
var input = read_line();
Prints the value to the standard output
printf(5);
Can also be used with placeholders
printf("The first:{} The second:{}\n", 5, 10);
Writes the content of the second argument to the file located at the path specified with the first argument
write_to_file("D:/docs/test.txt", "Hello File!");
Terminates the process immidiatly and returns the specified exit code
exit(64);
Returns a random number
var number = random();
Returns the length of a string
var length = strlen("Cellox");
Envokes a system call
system("pwd");
Returns true if the interpreter is executed under linux
if(on_linux()) // doing something
Returns true if the interpreter is executed under macOS
if(on_macOS()) // doing something
Returns true if the interpreter is executed under windows
if(on_windows()) // doing something
Returns the amount of seconds that have passed since the program execution has started
var expiredTime = clock();
Suspends the current thread for the specified number of seconds
wait(5);
Converts a single character string to a numerical value
asci_to_num("F"); // 70
Converts a numerical value to a asci character
num_to_asci(70); // "F"