Reference
Keywords
Every word the language reserves, and the one page that explains each.
Anyone who wants the whole vocabulary on one screen.
Pole reserves 24 words. The list below is the lexer's own keyword table
(tools/pole/src/Lexer.cpp), plus the two words that are recognised by
position rather than reserved.
Declarations#
| word | what it does | more |
|---|---|---|
processor | declares a processor — the unit that makes sound | Program structure |
graph | declares a graph, which wires processors together | Graphs |
node | names an instance of a processor inside a graph | Graphs |
connection | the block that holds a graph's wires | Graphs |
input / output | declares an endpoint | Endpoints |
stream | an endpoint carrying a number every sample | Endpoints |
event | an endpoint carrying a record at a frame | Events |
param | an input with a name, default and range | Parameters |
smooth | a time constant on a parameter | Parameters |
external | a buffer the host owns | State |
Types#
| word | what it does | more |
|---|---|---|
float | 32-bit float; float<2> is a vector of two | Types |
int | 32-bit integer | Types |
void | the return type of main and of a procedure | Functions |
Values#
Control flow#
| word | what it does | more |
|---|---|---|
loop | the frame loop; ends each pass with advance() | Program structure |
for | a bounded loop with a constant trip count | Control flow |
while | a loop capped by the safety pass | Control flow |
if / else | a branch | Control flow |
break | leaves the nearest bounded loop | Control flow |
return | returns from a function — never from main | Functions |
every | runs a body once every N frames | Control flow |
wrap | the index type of a bounded for | Control flow |
Recognised by position, not reserved#
init, on, advance, and the event payload names note, cc and bend
are matched where they appear rather than reserved as words. That is why
let on = gate > 0.5f; and let note = 60.0f; keep working — both already
appear in shipped code.
| word | what it does | more |
|---|---|---|
init | state built once, before the first frame | State and init |
on | an event handler | Handlers |
advance() | ends the frame | Program structure |
note cc bend | event payload types | Events |
Not in the language#
No struct, no class, no string, no switch, no goto, no %, no
pointers, no new. Recursion is rejected (POLE0603) and every loop is bounded
— which is what makes a patch from a stranger safe to compile and run.