A syntax error refers to a mistake in a statement's syntax. This term is used mostly in association with programming languages or command line interfaces. In compiled programming languages, a syntax error is a fatal error that the programmer must correct before being able to fully compile the program. Some IDEs are able to display syntax errors in real-time.
Syntax errors may also occur when an invalid equation is entered into a calculator. This is most often caused by opening brackets without closing them, or less commonly, using several decimal points in one number.
In the above example, an expected semi-colon is missing after the return statement.
- include
int main() { std::cout << "Hello world!\n";
return 0 }
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Syntax error".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world