Next: , Previous: , Up: Value Labels   [Contents][Index]


2.4.3 Adding and Removing Labels

These functions add and remove value labels from a struct val_labs object.

Function: bool val_labs_add (struct val_labs *val_labs, union value value, const char *label)

Adds label to in var_labs as a label for value, which must have the same width as the set of value labels. Returns true if successful, false if value already has a label.

Function: void val_labs_replace (struct val_labs *val_labs, union value value, const char *label)

Adds label to in var_labs as a label for value, which must have the same width as the set of value labels. If value already has a label in var_labs, it is replaced.

Function: bool val_labs_remove (struct val_labs *val_labs, union value value)

Removes from val_labs any label for value, which must have the same width as the set of value labels. Returns true if a label was removed, false otherwise.