Variables and Types
Variables are used to store data in StellarTrails. The language supports several basic types, including integers, strings, and booleans.
Declaring Variables
let x = 42
let name = "StellarTrails"
let flag = true
You can also specify the type explicitly:
let y: Int = 10
let s: String = "hello"
let b: Bool = false
Supported Types
Int
: Whole numbers (e.g., 42)String
: Text (e.g., "hello")Bool
: Boolean values (true
orfalse
)
Next: Functions