Core Syntax
Variable Management and Modification commands
Variable declaration (reg):
Definition:To create or modify a variable
Syntax:reg [data-type] [var-name] [value]
Example:reg int a 5*5
Variable calling ($var):
Definition:for maths expression and variable calling in prt command
Syntax:prt $var / reg int a $pi
Example:reg int a 5*5
Variable length (reg_len):
Definition:for maths expression and variable calling in prt command
Syntax:prt $var / reg int a $pi
Example:reg int a 5*5
File Management Commands
Create File (w_file):
Definition: Creates a new file and writes content to it.
Syntax: w_file [filename] ["content"]
Example:
w_file notes.txt "This is the first line."
Read File (r_file):
Definition: Reads a file’s content and stores it in a variable.
Syntax: r_file [filename] [var_name]
Example:
r_file notes.txt file_content
Append to File (a_file):
Definition: Appends text to an existing file.
Syntax: a_file [filename] ["content"]
Example:
a_file notes.txt "Additional text"
Delete File (del_file):
Definition: Deletes a specified file.
Syntax: del_file [filename]
Example:
del_file old_data.txt
Create Directory (create_dir):
Definition: Creates a new directory.
Syntax: create_dir [directory_name]
Example:
create_dir logs
Delete Directory (delete_dir):
Definition: Deletes an empty directory.
Syntax: delete_dir [directory_name]
Example:
delete_dir logs
Search File (search_file):
Definition: Searches for a keyword in a file.
Syntax: search_file [filename] [keyword]
Example:
search_file notes.txt "important"
Control Flow commands:
Skip to line (goto):
Definition: sets the interpreter current line to the specified line.
Syntax: goto [line(int)] //uses a 0 starting index.
Example:goto 0
if statement (if):
Definition:conditional statement used to execute a block of code based on whether a condition is true or false
Syntax:if [condition]
Exampleif x == 5 | y == 2
else statement (else):
Definition:used in conditional statements with "if" statements, to specify an alternative path of execution when the condition in the "if" statement is false.
Syntax:else
Example:
if x == 5
prt "t1"
else
prt "t2"
end
end statement (end):
Definition:used in conditional flow statements to end a sequential block.
Syntax:end
Example:
if true
else
end
while statement (while):
Definition:a control structure that repeatedly executes a block of code as long as a specified condition remains true.
Syntax:while [conditon]
Example:
while x <= 5
prt $x
add x x 1
end
function definiton (def) !!DEPRECATED!!:
Definition:used to define or declare a function.
Syntax:def [functionn-name]
Example:
def Hello
prt "hello world"
fncend
function definition end statement (fncend):
Definition:used to mark the end of a function definition.
Syntax:fncend
Example:
def t1
prt "t1"
fncend
function calling (call):
Definition:to call(execute) a function.
Syntax:call [function-name]
Example:
def t1
prt "t1"
fncend
call t1
Logging Commands:
Log Message (log):
Definition: Logs a message for debugging or tracking.
Syntax: log [message]
Example:
log "Script executed successfully"
Print Command (prt)
Definition: Prints text or variables with formatting options.
Syntax: prt [value] {options}
Example:
prt "Hello, World!" align=center color=blue
Utility Commands:
Wait (wait):
Definition: Pauses execution for a specified time.
Syntax:
wait [seconds]
Flush (flush):
Definition: Clears all stored variables and functions.
Syntax: flush
System Commands:
Exit (exit):
Definition: Immediately terminates the script.
Syntax: exit {message}
Clear Screen (cls):
Definition: Clears the terminal screen.
Syntax: cls {legacy}
NOTE: use the legacy keyword only when terminal doesn't supports os.system('cls').
Input Handling:
Input Command (inp):
Definition: Prompts the user for input and stores it, if no input is given, store a default data in var
Syntax: inp [variable_name] "prompt message" [default]
Arithmetic Commands:(Deprecated, use reg int [var] [math-expression] OR fastmath [var] = [expression]
Faster math statement(fastmath):
Definition:for faster calculation speed.
Syntax:fastmath [var] = [expression]
Example:fastmath abcd = (5*5%6**9*1.00007632**2)/1000
Addition (add):
Definition: Adds two numbers and stores the result.
Syntax: add [var_name] [num1] [num2]
Subtraction (sub):
Definition: Subtracts two numbers and stores the result.
Syntax: sub [var_name] [num1] [num2]
Multiplication (mul):
Definition: Multiplies two numbers and stores the result.
Syntax: mul [var_name] [num1] [num2]
Division (div):
Definition: Divides two numbers and stores the result.
Syntax: div [var_name] [num1] [num2]
Modulus (mod):
Definition: Performs modulation on two numbers and stores the result.
Syntax: mod [var_name] [num1] [num2]
Square Root (sqrt):
Definition: Calculates the square root of a number.
Syntax: sqrt [var_name]