It basically means you have typed something wrong.
When you type a program, it needs to be typed in exactly as the computer expects it because computers work on rules and if you have not followed all the rules then an error is created.
For example, in a basic program, you might enter the command.
PRINT "Hello"
Which prints Hello on the screen.
However, if you enter the command as:
PRINT Hello"
The computer will create a syntax error because it expects to see a quote mark after the PRINT command.
If you mis-type something it will cause a syntax error.
carrie
2016-05-26 17:08:34 UTC
To make things easy take the analogy of human languages like English. Syntax will be the correct spelling of words while semantics will be the validness or meaningfulness of what you write or say. In programming languages there is just a little shift from these general definitions. A compiler may not emit a syntax error if you just misspelled a keyword. It will consider it some unknown identifier which will lead to some other kind of errors. What a compiler considers as a syntax error is missing punctuators where they are expected. For instance in C/C++ and their family missing the matching close brace "}" or close parenthesis ")", or the semi-colon ";" at the end of a statement. Such syntax error will almost always trigger one or more semantic errors right after it as the compiler can't figure out the (meaning) of the code lines that were not delimited correctly.
2008-02-11 16:25:59 UTC
This is used in any type of computer programming, not just web design, and in basic terms it means the computer (or more accurately the compiler) does not understand the statement you have supplied it.
In more detail, the reason for not understanding is that the statement supplied does not obey the rules of the programming language you are using. It would be like speaking French (or any other language come to think of it) to most English people - most of us just look back at the speaker as if they've got two heads and wait for them to use English. Computers are the same - you have to supply language statements that follow the rules they expect.
For example, most languages have 'reserved words' which are fixed and have a specific meaning ("print" or "else" etc.); variables, which you define and can be called whatever you want; operators ("+", "-", "*" etc.); and operands which are the values you operate on (usually after assigning them to variables). In order to avoid a 'syntax error' you need to arrange all these items in the right order so the computer can recognise and process the statement you have supplied it.
www.okd.me
2008-02-11 16:01:00 UTC
Syntax Errors
The purpose of these wikis is to help people understand and fix syntax errors more quickly. The focus is more on examples than on explanation, with examples of code that causes the given syntax error to occur.
Got from http://syntaxerrors.info/. Go there for more info
?
2008-02-11 16:00:42 UTC
an error of language resulting from code that does not conform to the syntax of the programming language; "syntax errors can be recognized at compilation time"; "a common syntax error is to omit a parenthesis"
Syntax is the order in which words and phrases are put together, such as a URL (web address) which consists of several phrases that are strung together to define a location or service on the Internet. A syntax error occurs when a user (or programmer) has put words in an order that a program does not understand. A syntax error while surfing the Web may be caused by a mistyped or inadvertently rearranged URL, making it incomprehensible to a web browser.
Poojan
2008-02-11 16:03:47 UTC
In computer science a syntax error ( IPA: /ˈsɪntæks ɛrə(ɹ)/ ) refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.
If a syntax error is encountered during compilation it must be corrected if the source code is to be successfully compiled. An attribute that often separates commercial quality compilers from academic projects is the extent to which an attempt is made to automatically correct the error and continue processing the source code.
Syntax errors may also occur when an invalid equation is entered into a calculator. This can be caused by opening brackets without closing them, or less commonly, using several decimal points in one number.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.