Syntax errors occur if you mistype a keyword, forget to close a multiline command (such as DO … LOOP), or introduce a similar syntax error. If your script includes a syntax error, the script will not execute and an error message is generated.
Note In some programming environments, syntax errors are referred to as pre-processor, compilation, or compile-time errors.
The result of a syntax error depends on what type of debugging you are doing:
Tip The text of the error message might not always reflect the exact error. For tips about finding errors, see Debugging Tips and Tricks.
If you write programs in other environments, you will notice that syntax errors are handled differently in HTML scripts. In Visual Basic, for example, syntax errors are caught by the interpreter as soon as you leave the line in which the error appears. However, when you write scripts for HTML documents, the code is not interpreted until the code is executed — namely, when the document is requested by a browser.
See Also© 1997 by Microsoft Corporation. All rights reserved.