Neon
← Back to Basic data typesNext: Lists →

Variables

Variables are named storage slots for objects. They are dynamically typed, meaning a variable can hold any type of object.

Variable Rules

Naming:

Assignment:

Examples

# Basic assignment
x = 10
name = "Neon"

# Multiple assignments (chained)
100 -> a -> b -> c  # a, b, c all = 100

# Swapping variables
a = 5
b = 10
a <-> b  # Now a = 10, b = 5

# Deleting a variable
x = 42
del x    # x no longer exists

Special Variables

Variable Description
__name__ "__main__" in the main script, otherwise the filename.
__platform__ OS/architecture ("LINUX_AMD64", "WINDOWS_AMD64", "TI_EZ80").
__version__ Neon interpreter version (e.g., "4.1").
__args__ List of command-line arguments (in execution mode).
Ans In console mode, stores the result of the last evaluated expression.

← Back to Basic data typesNext: Lists →