LOCAL / :=
Try it yourself →Declares and assigns a variable.
Syntax
LOCAL name name := value
Description
Local variables are declared with LOCAL, assigned with :=. Types are not specified. String concatenation uses +.
Example
LOCAL name name := "HexLibrary" ? "Hello " + name
Expected output
Hello HexLibrary
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ Assignment uses :=; = is only for comparison (or ==).