%f format specifier not working ....

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

%f format specifier not working ....

1,702件の閲覧回数
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...

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

879件の閲覧回数
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 件の賞賛
返信