Syntax Overview
Complete guide to the language syntax and features.
Variables
Declare and assign values to variables using natural language
Pattern:
variable_name is equal to value
Variables are automatically declared when first assigned. No explicit type declarations needed.
Mathematical Operations
Perform arithmetic operations using English words
Basic Operations
plus - Addition
minus - Subtraction
times - Multiplication
divided by - Division
Examples
sum is equal to x plus y
difference is equal to a minus b
product is equal to width times height
average is equal to total divided by count
Comparison Operations
Compare values for conditional statements
Comparison Operators
is equal to
is not equal to
is greater than
is less than
is greater than or equal to
is less than or equal to
Usage Examples
if age is equal to 18 then
if score is greater than 90 then
if temperature is less than 32 then
if count is not equal to 0 then
Conditional Statements
Control program flow with if statements
Pattern:
if condition then
# statements
endif
# Example
if age is greater than 17 then
print "You can vote!"
endif
Loops
Repeat code execution with for and while loops
Pattern:
for variable from start to end
# statements
endfor
# Example
for i from 1 to 10
print i
endfor
Functions
Define and call reusable functions
Pattern (No Parameters):
let function_name be a function
# statements
end function
Pattern (With Parameters):
let function_name be a function accepting param1 and param2
# statements
end function
Functions can accept multiple parameters separated by "and". Use "return value" to return a value from a function.
Special Operations
Additional operations for variable manipulation
Increment/Decrement
increment variable_name
decrement variable_name
Print Output
print variable_name
print "text string"
Best Practices
Tips for writing clean and readable code
Tip
Use descriptive variable names
Instead of "x", use "age", "count", or "temperature" for clarity.
Tip
Keep consistent indentation
While not required, consistent indentation improves readability.
Tip
Use comments for complex logic
Add comments starting with # to explain complex calculations or logic.