Find units¶
saf_find_units
is a function defined in unit.c.
Synopsis:
-
int
saf_find_units
(SAF_ParMode pmode, SAF_Db *db, const char *name, const char *abbr, const char *url, double scale, double offset, double logbase, double logcoef, SAF_Quantity *quant, int *num, SAF_Unit **found)¶
Formal Arguments:
db
: Database in which to limit the search.name
: Optional unit description for which to search.abbr
: Optional abbreviation for which to search.url
: Optionalurl
for which to search.scale
: Optional scale for which to search (or passSAF__ANY_DOUBLE
).offset
: Optional offset for which to search (or passSAF__ANY_DOUBLE
).logbase
: Optional logorithm base for which to search (or passSAF__ANY_DOUBLE
).logcoef
: Optional logorithm coefficient for which to search (or passSAF__ANY_DOUBLE
).quant
: Optional quantity for which to search.num
: For this and the succeeding argument [see Returned Handles].found
: For this and the preceding argument [see Returned Handles].
Description: This function allows a client to search for units in the database. The search may be limited by one or more criteria such as the name of the unit, etc.
Preconditions:
pmode
must be valid. (low-cost)db
must be a valid database. (low-cost)num
andfound
must be compatible for return value allocation. (low-cost)
Return Value: The constant SAF__SUCCESS
is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Parallel Notes: Depends on pmode
See Also:
- Units: Introduction for current chapter