Closed djkirkham closed 6 years ago
#include <stdio.h> #include "udunits.h" int main() { ut_system* sys = ut_read_xml(NULL); ut_unit* u = ut_parse(sys, "mm2 day-2", UT_ASCII); u = ut_divide(u, u); char buf[128]; ut_format(u, buf, 128, UT_ASCII); printf("%s\n", buf); }
Output:
1 1
However, this unit doesn't compare equal to either "1" or "1 1" defined with:
"1"
"1 1"
ut_unit* one = ut_parse(sys, "1", UT_ASCII); ut_unit* one_one = ut_parse(sys, "1 1", UT_ASCII);
This was due to a bug in the UDUNITS-2 library. It should be fixed in the latest release (2.2.26).
Output:
However, this unit doesn't compare equal to either
"1"
or"1 1"
defined with: