Convenience function for finding a unit¶
saf_find_one_unit
is a function defined in unit.c.
Synopsis:
-
SAF_Unit *
saf_find_one_unit
(SAF_Db *database, const char *name, SAF_Unit *buf)¶
Formal Arguments:
database
: The database in which to find the specified unit.name
: The singular name of the unit to find, e.g., “meter”.buf
: [OUT
] Optional unit handle to initialize and return.
Description: This is a simple version of saf_find_unit
that takes fewer arguments.
Return Value: On success, a handle for the first unit found which has name name
or abbreviation name
in database database
.
Otherwise a SAF__ERROR_HANDLE
is returned.
See Also:
- Units: Introduction for current chapter