Discussion Locked

Syntax .....What is it ?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I keep receiving a syntax error on my website.
I have NO IDEA....what or where to look for it..Or even what it is and why Im getting it.
It says it's on line 2 char 1 .... I have looked at it ans see nothing wrong .
Please any input ?

5 replies

by admin

is roughly (ok, this could really be indepth but for the purpose here...) the format of your directive and since it's telling you the error is on line 2 (may be the only one or just the beginning of more bad lines) then start on line two and make sure EVERYTHING is absolutely perfect there because it is probably not currently. You can view the source in your browser and/or use your web editor. The problem is on line 2 in the source code. It could also be that your webserver doesn't have the ability to pull off whatever it is you need in line two, but usually you just have a dot or caps error or something so look closely :)

~Hope this helps.

by guruofdos

Oh yes....back to the heady days of programming in Commodore Basic on a PET!

A syntax error is caused by a parser or interpreter seeing something it does not understand. It can be a spelling error, misplaced symbol or incorrect positioning of parenthesis (brackets) or anything like that. Most computer languages are VERY picky about syntax (especially PASCAL), and changing one symbol in a line of code can really throw you. Sometimes these syntax errors are incredibly hard to spot. It could besomething as silly as inserting 2 spaces where only one is required. You need to consult a code manual and check that your line of code is syntactically correct and in the format that the interpreter is expecting. Different compilers or interpretersfor the same language can also expect slightly different versions of sysntax, so check which version your web server is expecting.

by jimbb

If you give us an URL someone here might have a look. If it's that one missing dot you will look over it 37 times, while someone with a fresh look may see it immediately.

Jim

This discussion is closed to new replies.