Sys

exec


(let exec (fun (_command) (...))) Execute a system specific command

Note: Return the output of the command as a String, or nil if it was disabled in the ArkScript build

Parameter

  • command: the command to execute, as a String

Author

@SuperFola

Example

(sys:exec "echo hello")

sleep


(let sleep (fun (_duration) (...))) Sleep for a given duration (in milliseconds)

Note: Return nil

Parameter

  • duration: a Number representing a duration

Author

@SuperFola

Example

(sys:sleep 1000)  # sleep for 1 second

exit


(let exit (fun (_code) (...))) Exit the program with the given exit code

Note: Any code after this function call won’t be executed

Parameter

  • exitCode: usually 0 for success and 1 for errors

Author

@SuperFola

Example

(sys:exit 0)  # halt the virtual machine with given exit code (success)

platform


(let platform <value>) Platform on which the program is running (Windows, Mac OSX, Linux, FreeBSD, Unix, Other)

Author

@SuperFola

args


(let args <value>) Arguments given to the program when running it from the command line

Author

@SuperFola