unsigned float temp, frac;
unsigned int decimal, fraction;
char str[7];
temp = 1.2345f; // A sample temperature value
decimal = (unsigned int) temp; // Get decimal part of temperature
frac = temp - (unsigned float) decimal; // Get fractional part of temperature
fract *= 10000; // 4-digits after period
fraction = (unsigned int) fract; // Convert fractional part to integer
glcd_PutMessage((rom char *) "The temperature is: ");
sprintf(str, "%d", decimal);
glcd_PutRAMMessage(str);
glcd_PutChar('.');
sprintf(str, "%d", fraction);
glcd_PutRAMMessage(str);