「编译错误」给出的信息都还是很友好的,它会说清楚发生问题的大致行、列位置,并且用语言描述具体的编译错误会警告。下表为编译错误中常用「长单词」的对照表,在遇到编译错误时,能自己看懂、对症下药,从而改对程序。
英文单词 | 中文意义 | 例句 | 例句解释 |
---|---|---|---|
Invalid | 无效的、无意义的 | Invalid use of dot | 使用了无意义的点 |
Illegal | 非法的、不合法的 | Illegal use of floating point | 使用了非法的浮点 |
Declared | 被声明 | ‘function’ must be declared with one parameter | ‘function’ 声明应该只有一个参数 |
Incorrect | 不正确的 | Incorrect number format | 错误的数字格式 |
Mismatch | 不匹配的 | Type mismatch in parameter ‘number’ | 参数 ‘number’ 的类型不匹配 |
Unterminated | 未结束的 | Unterminated string or character constant | 未结束的字符串或字符字面量 |
Missing | 缺失的 | Statement missing ; | 表达式中缺失了 ; |
Expected | 期望要有的 | Expected ‘;’ before ‘return’ | 在 ‘return’ 前期望有一个 ; |
Undefined | 未定义的 | Undefined structure ‘structure’ | ‘structure’ 结构体未定义 |
Duplicate | 重复的 | Duplicate case | case 是重复的 |
Redeclaration | 重复声明的 | Redeclaration of ‘int a’ | ‘int a’ 被重复声明 |