Skip to content

Latest commit

 

History

History
36 lines (36 loc) · 700 Bytes

NativeFunctions.md

File metadata and controls

36 lines (36 loc) · 700 Bytes

Native functions

beep

Plays the sound of a beep of a specified frequency and duration through the console speaker e.g. for the frequency 500hz and 100ms long

beep(500, 100);

clear

Clears the console e.g.

clear();

clock

Get the current time (right now only seconds) e.g.

var time = clock();

exit

Terminates the program execution and returns an exit code to the OS e.g.

exit(0);

random

Creates a random natural number e.g. for 1 number between 1 and 4

var number = random(1, 5);

read

Reads input from the user until he presses enter e.g.

var input = read();

wait

Suspends the program for x seconds e.g.

wait(5.25);