These functions create a new variable and insert it into a dictionary in a single step.
There is no provision for inserting an already created variable into a dictionary. There is no reason that such a function could not be written, but so far there has been no need for one.
The names provided to one of these functions should be valid variable names and must be plausible variable names.
If a variable with the same name already exists in the dictionary, the
assert variants of these functions return a null pointer,
without modifying the dictionary. The
assert variants, on the
other hand, assert that no duplicate name exists.
A variable may be in only one dictionary at any given time.
Creates a new variable with the given name and width, as if through a call to
var_createwith those arguments (see var_create), appends the new variable to dict's array of variables, and returns the new variable.
Creates a new variable as a clone of var, inserts the new variable into dict, and returns the new variable. The new variable is named name. Other properties of the new variable are copied from old_var, except for those not copied by
var does not need to be a member of any dictionary.