SDSsetMinMax(3DTM)

NAME
SDSsetMinMax, SDSgetMinMax - Scientific data set functions for setting ranges of values.

SYNOPSIS
#include <sds.h>

void SDSsetMinMax(char *header, float min, float max)

int SDSgetMinMax(char *header, float *min, float *max)

DESCRIPTION
SDSsetMinMax inserts into the character string header the SDSminmax flag followed by the minimum and maximum values of the dataset as specified by the user. It is the user's responsibility to ensure that these values do indeed match the minimum and maximum values in the data set.

SDSgetMinMax examines the character string header and returns the minimum and maximum values of the data set. There is no guarantee that these values read from the header will match either the minimum or the maximum of the data received since SDSgetMinMax has no way of reviewing and interpreting the data.

SEE ALSO
DTM, SDSclass

DIAGNOSTICS
SDSgetMinMax returns a value of 0 upon successful parsing of the header. If the tag SDSminmax is not found within the header, the function returns the error DTMERROR and no minimum or maximum values are assigned.

BUGS
SDSsetMinMax has no way of determining if the header contains sufficient space to hold the tag SDSminmax and both specified values. The results of attempting to store this information beyond the end of the allocated space are undefined.

SDSgetMinMax assumes that two values follow the SDSminmax flag. If less than two follow the tag, the results are undefined, thus it is important to use SDSsetMinMax to ensure that both values are inserted when creating the header.