PHP Tutorial 3: Syntax & Interpretation

Syntax is really important. Syntax is really, really, important. If you are new to programming, I cannot stress this enough: Syntax is really, really, really important. How important is it? Without proper syntax, your program isn't even a program at all. It's that important.

What is syntax? In both programming and linguistics definitions, syntax refers to the rules and principles for constructing sentences or statements in a language. What does this mean for you? Programming is very precise. One invalid keystroke anywhere in your code could result in the entire program breaking. Remember, computers aren't like humans; they don't read the code like humans might read it. Computers process your code by parsing it, or breaking it down into the rules of a language. If your code is not properly formed, the computer won't be able to break it down and figure out what you want it to do.

You must also ensure that you follow the syntax of the language in which you are programming. Code written in PHP may look entirely different in another language since each language has different rules and is parsed differently. It is for this reason that you need to be very accurate in your programming. Even if code is syntactically correct, if you don't follow the rules of the language, the code may do something you do not expect.

As a new programmer, one of the most time-consuming processes you will face is going through your code to find the one minor symbol you may have forgotten or by finding that extra character that wasn't supposed to be in the code at all. Over time you will train your eye to spot these errors, but until you reach that point, you must be extra careful when copying code or writing new code yourself.
123 >
By Chris - September 8, 2009 | Read Comments
Recommended Reading:
Comments (Viewing 0-0 of 0)
There are currently no comments.
You must be logged in to post comments. Click here to sign in.

New Modules
Sign In With Facebook
Sign In With Mowia

about mowia
Mowia is a collaborative content management website. You can share your thoughts, experiences, and knowledge with others, and we'll organize that information so anyone can read and learn from it. Live, explore, and share your knowledge with others.
mowia.com  |  myMowia  |  Help Center  |  Privacy  |  Terms

Notice: Mowia is an independent organization that does not provide offical support services for any of the products referenced on the forum nor does it represent any of the companies whose products are referenced. All product copyrights, patents, and trademarks belong to their respective owners.

Valid CSS!
© 2009 mowia.com