10000 Routines · 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

Definition Syntax

routine name
  ...
  return  # optional
endRoutine

routine name->ReturnType
  ...
  return result
endRoutine

routine name( alpha:Alpha, beta=default_value:Beta, ... )
routine name( ... )->ReturnType

Call Syntax

name
name()
name( arg1, arg2, ... )
name( ..., &named_arg, &!named_arg, &named_arg2=value, &=named_arg_3 )
local result = name(...)

See also: Named Arguments.

Description

  • A routine is a library-global procedure (AKA function).
  • A routine with no return type "returns nil".
  • When a return type is given, return some-value immediately terminates execution of the routine and yields the specified result in place of the routine call.
  • For nil-return routines, return is optional and will immediately terminate routine execution.
Clone this wiki locally
0