Using the Check Command to Look for Syntax Errors
 
 
 

You can perform additional syntax checking with the VLISP Check command. The Check command can detect the following errors:

Some syntax errors can only be determined at runtime and Check cannot detect these errors. For example, if you call a function that expects an integer argument and you supply a string, AutoLISP does not detect this until run-time. As a result, this error will not be detected until you run your program.

To run the Check command on text in an editor window

  1. Switch to the editor window containing the code you want to check.
  2. To check the entire file, choose Tools Check Text in Editor from the VLISP menu.

  3. To check the syntax of a selected piece of code instead of the whole program, choose Tools Check Selection.

VLISP displays error messages in a new Build Output window, if it detects errors. For example, if you change the iff in drawline-with-errors.lsp to if and run Check, the following error message results:

The message indicates that an if function call contains too many arguments.