8000 local · brombres/Rogue Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Brom Bresenham edited this page Mar 19, 2025 · 4 revisions

Syntax

local a : Type
local a = initial_value
local a=initial_value : Type
local a=value1, b=value2
local a, b, ... : Type

Description

  • If no type is specified, the type of a local is inferred from its initial assignment.
  • A local variable exists from its declaration to the end of its enclosing control structure (if, block, etc.).
  • Local variables can be declared in routines, methods, and global methods.
  • Local variables can also be defined at the library scope, outside of any class declaration, in which case they are local to the implicit on_launch() routine of the library.
Clone this wiki locally
0