User Tools

Site Tools


4rpl:commands:settableelement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
4rpl:commands:settableelement [2021/01/08 11:01] – external edit 127.0.0.14rpl:commands:settableelement [2021/03/05 10:07] (current) Karsten75
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
-<=[[4rpl:start| Index]]+<=[[4rpl:start| Index]] \\ 
 +<=[[4rpl:start#tables| Tables]] 
 + 
 +<WRAP tabs> 
 +  * [[4rpl:commands:GetTableElement|Get]] 
 +  * [[4rpl:commands:SetTableElement|Set]] 
 +</WRAP>
  
 ====== SetTableElement ====== ====== SetTableElement ======
-SetTableElement(<-table <-key <-value+SetTableElement(<-table <-key <-value)
  
 ===== Description ===== ===== Description =====
 Sets an element in a table. Note that keys are case sensitive strings. Sets an element in a table. Note that keys are case sensitive strings.
 +
 +For doing the same thing but with arguments in order of **value**, **table**, **key**, see [[4rpl:commands:settableelementrpn|SetTableElementRPN]].
 +
 A special syntax can also be used to set a table element. See the example below. A special syntax can also be used to set a table element. See the example below.
  
- ===== Examples ===== +===== Examples ===== 
- <code 4rpl> + 
- CreateTable ->table +<code 4rpl> 
- SetTableElement(<-table "SomeKey" 42) +CreateTable ->table 
- trace(GetTableElement(<-table "SomeKey) #prints "42"+SetTableElement(<-table "SomeKey" 42) 
 +GetTableElement(<-table "SomeKey"Trace  # prints "42" 
 + 
 +# alternate syntax 
 +# Use curly braces around to surround the key. 
 +42 ->table{"SomeKey"
 +  
 +</code>
  
- #alternate syntax 
- #Use curly braces around to surround the key. 
- 42 ->table{"SomeKey"} 
- </code> 
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
 +
  
4rpl/commands/settableelement.1610121708.txt.gz · Last modified: 2021/01/08 11:01 by 127.0.0.1