Previous: Inspecting User-Missing Value Sets, Up: User-Missing Values [Contents][Index]
These functions modify the contents of struct missing_values
objects.
The next set of functions applies to all sets of user-missing values:
Attempts to add the given discrete value to set of user-missing
values mv. value must have the same width as mv.
Returns true if value was successfully added, false if the set
could not accept any more discrete values or if value is not an
acceptable user-missing value (see mv_is_acceptable
below).
These functions are equivalent, except for the form in which value is provided, so you may use whichever function is most convenient.
Removes a discrete value from mv (which must contain at least one discrete value) and stores it in value.
Attempts to replace the discrete value with the given index in
mv (which must contain at least index + 1 discrete values)
by value. Returns true if successful, false if value is
not an acceptable user-missing value (see mv_is_acceptable
below).
Returns true if value, which must have the specified
width, may be added to a missing value set of the same
width, false if it cannot. As described above, all numeric
values and string values of width MV_MAX_STRING
or less may be
added, but string value of greater width may be added only if bytes
beyond the first MV_MAX_STRING
are all spaces.
The second set of functions applies only to numeric sets of user-missing values:
Attempts to add a numeric range covering low…high (inclusive on both ends) to mv, which must be a numeric set of user-missing values. Returns true if the range is successful added, false on failure. Fails if mv already contains a range, or if mv contains more than one discrete value, or if low > high.
Given mv, which must be a numeric set of user-missing values
that contains a range, removes that range from mv and stores its
low endpoint in *low
and its high endpoint in
*high
.
Previous: Inspecting User-Missing Value Sets, Up: User-Missing Values [Contents][Index]