Utilities / Reference
compound-assignment
Pine v5/v6 parity: `x += y`, `x -= y`, `x *= y`, `x /= y`, `x %= y` are supported and desugar to `x := x + y` (etc.). Works on any reassignable variable (let/var/varip) and inside function bodies, if branches, for/while loops.
compound-assignment += <expr> // also -=, *=, /=, %= → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | identifier | Yes | — | Target variable. Must already be declared. |
expr | any | Yes | — | Right-hand side; combined with the existing value via the implied operator. |
Returns
voidExample
compound-assignment
var int count = 0for i = 0 to 9 count += 1 // Equivalent to:// count := count + 1Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.