12.16 Unsupported Features
The fixed-point conversion specifiers for formatted I/O, as described in Section 4.1.9 “Formatted I/O functions for fixed-point arguments” of ISO/IEC TR 18037:2008, are not supported by the current MPLAB XC32 standard C libraries. Fixed-point arguments must be used in formatted I/O routines by conversion to or from an appropriate floating-point representation. For example:
#include <stdio.h>
#include <stdfix.h>
int main(void)
{
fract a = 0.5;
accum b;
double d;
scanf ("%lf", &d); /* read into floating-point type */
b = (accum) d; /* convert to fixed-point type */
printf ("%1.4f", (float) a); /* cast to floating-point type for output */
return 0;
}
The fixed-point functions described in Section 4.1.7 of ISO/IEC TR 18037:2008 are not provided by the current MPLAB XC32 standard C libraries.