article

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.

Example of a syntax error in C++


  1. include

int main() { std::cout << "Hello world!\n";

return 0 }

In the above example, an expected semi-colon is missing after the return statement.

See also


Computer errors

Syntax error

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Syntax error".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld