Forgot your password?  

Not What You Meant?  There are 43 definitions for TCL.  Also try: Tree or Grammatical category or Pilot.

Syntax | Research & Encyclopedia Articles

Print-Friendly   Order the PDF version   Order the RTF version
About 1 pages (330 words)
Syntax Summary

 


Syntax

Syntax is simply the rules that define the structure of a programming language. These rules specify how the words, symbols, and punctuations are used to form a statement. Each program, thus, has its own set of syntactical rules. The format used by a program governs which words are meaningful to the computer, how they are spelled, in what combination they are to be written, and what punctuation is necessary. In human languages these rules are rather relaxed, but in computer programming languages these rules are inflexible. If the rules of syntax are not followed exactly, the computer will not understand it, and the user will get a syntax error message.

A syntax error is basically any error that breaks one of the strict rules of grammar imposed by any language. All errors must be "caught" and corrected before the program will run. An example of a syntax error would an error in logic.

This would be something like defining a set of operations that are not permitted. To illustrate, adding together the two Boolean types. In Boolean logic, all operations produce one of two possible alternative values--either something is true or it is false. Obviously, something cannot be true and false at the same time.

Finding every syntax error in a document can be a tedious process. There are programs available, however, that are able to check for syntax problems during compilation. The compiler is that portion of the program that reorganizes the source code and turns it into the object code, which is what the computer understands. This would be the equivalent of translating the human language into the machine language. The process for tracking down syntax errors is called parsing, or syntax analysis. Once an error is found these programs are able to locate where the error is within the code and also indicates what rule has been broken--punctuation, incomplete statement, etc. Logic errors, however, are more difficult to discover and often require a skilled human programmer to detect them.

This is the complete article, containing 330 words (approx. 1 page at 300 words per page).

More Information
  • View Syntax Study Pack
  • 43 Alternative Definitions
  • Search Results for "Syntax"
  • More Products on This Subject
    Syntax
    Syntax "Syntax" is the theory of the construction of sentences out of words. In lingu... more

    Syntactical and Semantical Categories [addendum]
    Syntactical and Semantical Categories [addendum] Categorical distinctions in syntax and semantics ar... more


    Ask any question on Syntax and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Syntax from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags

    Join BookRagslearn moreJoin BookRags