文档详情

Codewarrior帮助文件Codewarrior帮助文件.pdf

发布:2018-04-25约4.04万字共25页下载文档
文本预览下载声明
《单片机技术初步实践》帮助文档  Codewarrior 帮助文件 2008 4 1  《单片机技术初步实践》帮助文档  一、C 语言语法常见问题及修改提示 1. C1000: Illegal identifier list in declaration 函数声明中非法的标识符列表  Description  A function prototype declaration had formal parameter names, but no types were provided for the  parameters.  在函数声明时,使用了形式参数的名称,而不是参数的类型  Example  char f(i);  Tips  Declare the types for the parameters.  使用参数的形式来声明函数 如  char f(unsigned char)  2. C1004: Redefinition of storage class 存储类型的重复定义  Description  A declaration contains more than one storage class.  一个定义是用了一个以上的存储类型的定义  Example  staticstaticchar i;  Tips  Declare only one storage class per item.  只需定义一次存储类型 如  static char i;  3. C1005: Illegal storage class 非法使用的存储类型  Description  A declaration contains an illegal storage class.  变量定义时使用了不允许使用的存储类型  Example  auto unsigned char i; // ‘auto’ illegal for global variables  Tips  Apply a correct combination of storage classes.  使用正取的存储类型定义,如上例中,若 i 为全局变量则不能用 auto来声明。 4. C1007: Type specifier mismatch 类型区分符不匹配  Description  The type declaration is wrong.  数据类型定义错误  Example  unsigned char char i;  Tips  Do not use an illegal type chain.  使用正确的数据类型定义 如例应当改为  char i  5. C1016: Parameter redeclaration not permitted 参数不能重复定义 [ERROR] 2  《单片机技术初步实践》帮助文档  Description A parameter object was declared with the same name as another parameter object of the same function. 在一个函数中,反复定义一个参数名 Example void f(unsigned char i, unsigned char i) Tips Choose another na
显示全部
相似文档