Welcome to the ScriptoriumX documentation!

This documentation will explain every every bit of the programming language Sorium.

Console Log

Sorium has two different methods of writing to the console.

In Sorium you can "log()" and "warn()". The only difference between them is the icon they show in the console.

Here is an example of both functions.

log("Hello World!")
warn("Hello World!")

Variables

A key part of most programming languages are its variables.

In Sorium, we have two types of variables: "var" and "array". These variables play a crucial role in storing and manipulating data within scripts. To ensure proper organization and control over variable accessibility, we can define them as either local or public.

When we define a variable as local, it means that its scope is limited to the script in which it is declared. This abstraction helps prevent unintended conflicts or interference with variables in other scripts. Local variables are typically used when we need temporary or script-specific data storage.

Here is an example of using a local variable and array:

local var greeting = 'hello'
local array fruits = [{'Apple'},{'Orange'}]

I can NOT call this from another script.

On the other hand, a public variable is designed to be accessible from any script. By marking a variable as public, we enable other scripts to access and modify its value. Public variables are useful for sharing data or maintaining a consistent state across multiple scripts or modules.

Here is an example of using a public variable and array:

public var greeting = 'hello'
public array fruits = [{'Apple'},{'Orange'}]

And this is how you would call it from another script:

log(greeting) >> Output: hello

Shapes

Sorium has its own method of drawing a manipulating shapes using canvas.

Sorium's typography has a unique way of representing actions and operations using function calls. Instead of writing out lengthy explanations, Sorium simplifies things by using a word followed by parentheses to encapsulate the necessary parameters. This approach makes the code more concise and easier to understand. It's like having a shorthand notation that helps developers express their intentions clearly and efficiently. So, in Sorium, you'll often see functions written as "word(parameters)". This clean and structured style of writing code in Sorium promotes readability and makes programming tasks more manageable.

The "drawShape()" function fairly simple, below is a template showing where to put everything.

drawShape(Name, Color, Width, Height, Shape, X-Position, Y-Position, Z-Position)

Here is an example of drawing a square:

drawShape("MySquare", #ff43ae, 100, 100, "Rectangle", 0, 0, 1)