文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>[转载]keil c51中printf 与标准c有别...

[转载]keil c51中printf 与标准c有别...

时间:2010-08-14  来源:tommyqq

QUESTION

I can get the printf command to work with integers but not long integers or 8-bit integers. Why?

ANSWER

KEIL里扩展出了b,h,l来对输入字节宽的设置:
(1)b八位
(2)h十六位
(3)l三十二位

在Keil C51中用printf输出一个单字节变量时要使用%bd,如
unsigned char counter;
printf("Current count: %bd\n", counter);

而在标准C语言中都是使用%d:
printf("Current count: %d\n", counter);

相关阅读 更多 +
排行榜 更多 +
我是班长去广告版下载

我是班长去广告版下载

模拟经营 下载
什么鸭小游戏安卓版下载

什么鸭小游戏安卓版下载

策略塔防 下载
极光影院官方最新版本2025下载

极光影院官方最新版本2025下载

趣味娱乐 下载