「編譯錯誤」給出的資訊都還是很友好的,它會說清楚發生問題的大緻行、列位置,并且用語言描述具體的編譯錯誤會警告。下表為編譯錯誤中常用「長單詞」的對照表,在遇到編譯錯誤時,能自己看懂、對症下藥,進而改對程式。
英文單詞 | 中文意義 | 例句 | 例句解釋 |
---|---|---|---|
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’ 被重複聲明 |