Core Language (BCL)
The BattleScript Core Language defines the syntax, semantics and keywords of the language itself — everything that is the same regardless of which device or runtime executes your script. Pick a topic below to get started.
Keywords
The full list of reserved words and what each one does.
Variables and Data Types
Declaring typed variables and constants, and the built-in data types.
Functions
Defining functions, parameters, return values, modifiers and error handling.
States, Modules and Events
The event-driven state / module / event model that runs on the device.
Timers
Scheduling work with after and every, and controlling running timers.
Enums
Grouping related named constants used for states, modules and events.
Interfaces
Describing the shape of objects and event payloads.
Protocols
Defining bit-level encode/decode protocols for IR and comms.