User Tools

Site Tools


4rpl:commands:gettableelement

This is an old revision of the document!


Index

GetTableElement

GetTableElement(<-table <-key) ->value

Description

Retrieves an element from a table and pushes it to the stack. Note that keys are case sensitive strings. A special syntax can also be used to retrieve a table element. See the example below.

Examples

 CreateTable ->table
 SetTableElement(<-table "SomeKey" 42)
 trace(GetTableElement(<-table "SomeKey))  #prints "42"
 
 #alternate syntax
 #Use curly braces around to surround the key.
 trace(<-table{"SomeKey"}) #prints "42"
 

Index

4rpl/commands/gettableelement.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)