Aliases

  • getconstant

Arguments

function | number
required
The function to inspect, or a positive stack level identifying a caller.
number
required
A 1-based slot index.

Returns

any
The constant in the selected slot, or nil for a function/table constant.
Indexes start at 1; out-of-bounds raises. Function/table constants are represented as nil. Related types: Debug types & behavior.

Example