go-v.orgcodex
Menu
Page tools

codex · Philosophy

Syntax error

Diagram for Syntax error
A syntax error is a mismatch in the syntax of data input to a computer system that requires a specific syntax. For source code in a programming language, a compiler detects syntax errors before the software is run (at compile-time), whereas an interpreter detects syntax errors at run-time. A syntax · image: Wikimedia Commons

A syntax error is a mismatch in the syntax of data input to a computer system that requires a specific syntax. For source code in a programming language, a compiler detects syntax errors before the software is run (at compile-time), whereas an interpreter detects syntax errors at run-time. A syntax error can occur based on syntax rules other than those defined by a programming language. For example, typing an invalid equation into a calculator (an interpreter) is a syntax error. Some errors that occur during the translation of source code may be considered syntax errors by some but not by others.

For example, some say that an uninitialized variable in Java is a syntax error, but others disagree – classifying it as a static semantic error.

Wikipedia contributors, "Syntax error", Wikipedia, revision 1382725102, retrieved 20 November 2026, source, CC BY-SA 4.0.

More Philosophy · Search the codex