Core Syntax
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"
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
Control Flow Commands:
If-Else (if, else, end):
Definition: Executes a block of code if a condition is met.
Syntax:
if [condition]
// Code block
else {optional}
// Code block
end
While Loop (while, end):
Definition: Repeats a block of code while a condition is true.
Syntax:
while [condition] // Code block end
Function Declaration (def, fncend, call):
Definition: Defines a function, which can later be called.
Syntax:
def [function_name] // Code block fncend call [function_name]
Increment & Decrement (inc, dec):
Definition: Increases or decreases an integer variable.
Syntax:
inc [variable_name]
dec [variable_name]
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').
Goto (goto):
Definition: Jumps to a specific line number in the script.
Syntax: goto [line_number]
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]
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]