%f format specifier not working ....

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

%f format specifier not working ....

1,640 Views
MohamedAnees
Contributor I

Hi,

 

I am using the below code to print characters onto hyperterminal. 

 

int printf(const char *format, ...) {
  char outbuf[MAXLINE];
  int i;
  va_list args;
  va_start(args, format);
  i = vsprintf(outbuf, format, args);
  va_end(args);
  WriteString(outbuf);
  return i;
}

I am not able to get output for %f and %c format specfier. %d format specifier works fine. Please suggest....

 

Thank you...

Labels (1)
0 Kudos
Reply
1 Reply

817 Views
RichTestardi
Senior Contributor II

What MCU are you using?

 

Could this be the issue:

 

  http://forums.freescale.com/freescale/board/message?board.id=CWCFCOMM&thread.id=2280

 

It looks like you might need:

 

LIBDEF_PRINTF_CHAR

LIBDEF_PRINTF_FLOATING

 

-- Rich

 

0 Kudos
Reply