NeonNeon supports several primitive data types:
| Type | Description | Example |
|---|---|---|
| Integer | Whole numbers (64-bit on most systems, 24-bit on TI-EZ80) | 42, -10, 0xFF (hex), 0b1010 (binary) |
| Real | Floating-point numbers (double-precision if supported) | 3.14, -0.5, 1e3 (1000.0) |
| Bool | Boolean values | True, False |
| String | Text (ASCII) | "Hello", 'World' |
| NoneType | Represents "nothing" | None |
# Integers
x = 42
y = 0x1A # Hexadecimal (26 in decimal)
z = 0b1010 # Binary (10 in decimal)
# Reals (floats)
pi = 3.14159
e = 2.71828
# Booleans
is_true = True
is_false = False
# Strings
name = "Neon"
greeting = 'Hello, ' + name # String concatenation
# None
result = None
Use built-in functions to convert between types:
int("123") # → 123 (Integer)
str(42) # → "42" (String)
float(5) # → 5.0 (Real)
bool(1) # → True (Bool)