Neko

Welcome to X3 DMI Documentation

A comprehensive guide to mastering X3 Data Management Interpreter.

About X3 DMI

X3 Data Management Interpreter is a powerful tool for file handling, advanced printing, and web integration. Built for new developers, it simplifies complex tasks and enhances learning experiences.

  • Version: 2.9
  • Last Updated: 14/1/25
  • Developer: XFydro

Core Syntax

File Management Commands

Create File (w_file):

Definition: Creates a 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 content of a file and prints or stores it in a variable.

Syntax: r_file filename [var_name]

Examples:

r_file notes.txt
r_file notes.txt file_content

Enhanced Print Command(prt):

Definition: Prints text or variables with alignment, color, or formatting options.

Syntax: prt value [options]

Examples:

prt "Hello World" align=center color=blue
prt "Age: 25" tofile=output.txt

Logging Commands:

Log Message (log):

Definition: Logs a message for debugging or status tracking.

Syntax: log message

Example:

log "File upload successful"

Read Logs (read_log):

Definition: Displays all logged messages.

Syntax: read_log

Example:

read_log

Wait Command:

Pause Execution (wait):

Definition: Pauses execution for a specified number of seconds.

Syntax: wait seconds

Example:

wait 10

Error Handling Commands:

Catch (catch):

Definition: Executes a block of code if an error occurs.

Syntax:

catch
 // Code to execute on error
end

Example:

catch
 prt "An error occurred"
end

Throw (throw):

Definition: Triggers an error manually, typically for debugging purposes.

Syntax: throw "Error message"

Example:

throw "Invalid user input"

Control Flow Commands:

Switch-Case (switch):

Definition: Implements a switch-case logic structure.

Syntax:

switch variable
 case value1
  // Code block
 case value2
  // Code block
 default
  // Code block
end

Example:

switch user_input
 case "yes"
  prt "You chose yes"
 case "no"
  prt "You chose no"
 default
  prt "Invalid choice"
end
pr

System Commands:

Exit Program (exit):

Definition: Exits the current script immediately.

Syntax: exit

Example:

exit

Clear Screen (clear):

Definition: Clears the terminal or console screen.

Syntax: clear

Example:

clear

Input Handling:

Input Command (inp):

Definition: Prompts the user for input and stores the result in a variable.

Syntax: inp variable "prompt message"

Example:

inp user_input "Enter your name:"
prt "Hello, $user_input!"

Loops

For Loop:

Syntax: for var_name start end

Example: for i 1 10

While Loop:

Syntax: while condition

Example: while x < 5