打印
[工具和软件]

KDS的C语言有个__COUNT__怎么用?

[复制链接]
1048|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
forthlab|  楼主 | 2015-12-14 19:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
NXP_TICS_Jeremy| | 2015-12-15 09:24 | 只看该作者
最简单方法,通过search功能,查找一下

使用特权

评论回复
板凳
春风的暖暖| | 2015-12-15 11:15 | 只看该作者
有一个search功能,你查找整个工程试一下

使用特权

评论回复
地板
forthlab|  楼主 | 2015-12-15 17:41 | 只看该作者
NXP_TICS_Jeremy 发表于 2015-12-15 09:24
最简单方法,通过search功能,查找一下

我是看到help里面介绍有这个,
找不到说明

使用特权

评论回复
5
forthlab|  楼主 | 2015-12-17 08:20 | 只看该作者
谁知道如何用这个__COUNTER__

使用特权

评论回复
6
forthlab|  楼主 | 2015-12-21 17:29 | 只看该作者
文档里面查到的,但还是不会用;
编译出错!
=================================

Predefined Macros
The compiler preprocessor has predefined macros (some refer to these as predefined
symbols). The compiler simulates variable definitions that describe the compile-time
environment and properties of the target processor.
This chapter lists the predefined macros that all CodeWarrior compilers make available.
• __COUNTER__
• __cplusplus
• __CWCC__
• __embedded_cplusplus
• __FILE__
• __func__
• __FUNCTION__
• __ide_target()
• __LINE__
• __MWERKS__
• __PRETTY_FUNCTION__
• __profile__
• __STDC__
• __TIME__
__COUNTER__
Preprocessor macro that expands to an integer.
Syntax
__COUNTER__
Remarks
The compiler defines this macro as an integer that has an initial value of 0
incrementing by 1 every time the macro is used in the translation unit.
The value of this macro is stored in a precompiled header and is restored when the
precompiled header is used by a translation unit.

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

87

主题

749

帖子

5

粉丝