ADDKEY

Syntax: #ADDK recordvar key value

Related: #DELKEY

Adds a key-value pair to a record variable. Record variables are a list of key properties, each with a value. Key must be unique. Any existing value for the given key is replaced with the new value.

You can also use the syntax: #ADDKEY recordvar {field=key|field=key...} to assign more than one key at a time. To set multiple fields to the same value, you can also use: #ADDKEY dbrec {field1|field2|...} Value

ADDKEY Example

#ADDKEY db Name Zugg

Adds the key "Name" to the record variable @db, with the value of "Zugg"

 

#ADDKEY db {Name=Zugg|Level=20}
#SHOWDB @db

will display:

Name: Zugg

Level: 20

 

#ADDKEY db {Name|Level} ""

will clear out the values of the Name and Level keys in the @db variable.



Contents #ADD #ADDITEM