Skip to content

Language Basics

Learn the core syntax and semantics of Primora.

Variables

x = 10
y = "hello"

Data Types

  • int, float, string, bool, list, dict

Operators

  • Arithmetic: +, -, *, /, %
  • Comparison: ==, !=, >, <, >=, <=
  • Logical: and, or, not

Control Flow

if (x > 0) {
    echo "Positive"
} else {
    echo "Non-positive"
}

Functions

def add(a, b) {
    return a + b
}
result = add(2, 3)

Comments

# This is a comment

Continue to AI Features or revisit the Dictionary.