-
Notifications
You must be signed in to change notification settings - Fork 0
Features & Functions
You can print strings and other value types to the output console.
print("test") // test
print(69420) // 69420
You can also provide multiple parameters so they become concatenated with a space in between.
print("number:", 1) // number: 1
print("list:", [1, 2, 3]) // list, [1, 2, 3]
You can obtain input from the user through the console by using the input()
function.
This will always be a string.
let user_input = input()
You can safely exit a program by using the exit()
function
exit()
You can provide an exit code by giving it as a parameter
exit(69)
Get a list of numbers based on an input.
let x = range(10) // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
let y = range(4, 10) // 4, 5, 6, 7, 8, 9
let z = range(4, 10, 2) // 4, 6, 8
Get the length of the object based on what it is.
let str = len("test") // 4
let list = len([1, 2, 3]) // 3
By using this function you can convert a string or a double float to an integer. If you give it a floating point string it will be rounded down.
let rounded = int("69.420") // 69
let integer = int("420") // 420
let floor = int(69.420) // 69
Get the type of the object as a string.
let s = type("string") // String
let n = type(69) // Number
let l = type([1, 2, 3]) // List
let b = type(true) // Boolean
By using the double()
function you can convert a string with a decimal point to a standard number.
let num = double("69.420") // 69.42
time
is an object that contains function that utilities for interacting with time
time.sleep()
will pause the script for x amount of milliseconds.
time.sleep(1000) // sleeps for 1 second
time.sleep(420) // sleepds for 420 milliseconds
time.epoch()
will get the current time in epoch format
let t = time.epoch()