rawget

Gets the value of a table item without invoking metamethods

Prototype

v = rawget (table, index)

Description

Gets the real value of table [index] without invoking metamethods. Index should not be nil.

print (rawget (_G, "Note")) --> nil
print (rawget (world, "Note"))  --> function: 02058190
print (Note) --> function: 02058190 
This example shows that the Note function is not really in the global environment. MUSHclient adds a metamethod to pull it from the "world" table.

Lua functions

Topics