Documentation

#ADDKEY

ADDKEY

Syntax: #ADDK varname 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.

Do not specify the @ before the varname variable name.

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 Examples

#ADDKEY dirs Name home
Adds the key "Name" to the record variable @dirs, with the value of "home"
#ADDKEY dirs {Name=home|Count=9}
#SHOWDB @dirs
will display:
Name: home
Count: 9

#ADDKEY dirs {Name|Count} ""
will clear out the values of the Name and Count keys in the @dirs variable.

Add comment

Login or register to post comments