Skip to content
HugeBrain16 edited this page Feb 19, 2026 · 7 revisions

Keywords

let

Used to declare/define a variable

let n = 10;

let x;
let y;

x = 10;
y = 20;

func

Used to define a function

func say(msg) {
  println(msg);
}

say("Great things are happening...");

return

Used in a function to return a value

func format(user, msg) {
  return user + ": " + msg;
}

let str = format("mango", "says this");
println(str);

null

null

let x = 10;
println(x);
x = null;
println(x);

true & false

boolean types

if & else

func match(str1, str2) {
  if (str1 == str2)
    return true;

  return false;
}

let status = match("hello", "hello");
println(status);

Built-in calls

print(...)

Print values to terminal
can take unlimited arguments

let msg = "Important message";
print(msg);

println(...)

Print values to terminal with newline
can take unlimited arguments

let msg = "Critical message";
println(msg);

exec(command)

Execute commands
takes 1 argument

println("Right now is...");
exec("time");
exec("date");

as_str()

takes 1 argument

let score = 1337;

println("My score: " + as_str(score));

as_int()

takes 1 argument

let score = 1337;
let input_score = "-1000";

score = score + as_int(input_score);
println(score);

as_float()

takes 1 argument

let asdf = "1.25";

println(as_float(asdf));

file_open(filename, mode)

opens a file with the specified mode

let file = file_open("readme.txt", "r");

if (file)
  println("File exist.");

file_read(file, length)

reads data from file by the specified length

let file = file_open("readme.txt", "r");

let content = file_read(file, 32);
println(content);

file_write(file, string)

writes string into the specified file

let file = file_open("readme.txt", "w");
file_write(file, "This is the start of the readme");