Visual LISP uses color coding to help identify elements entered in the Console and text editor windows.
Elements entered might be a built-in AutoLISP function, number, or string. Color coding makes it easier to detect missing quotes or misspelled function names.
The Visual LISP text editor provides color coding for AutoLISP, DCL, SQL, and C++ language source files. The color coding used in the Console and text editor windows is determined by a file's type, which is based on the file’s extension. You can change the color coding style associated with a file type by clicking Tools Window Attributes Syntax Coloring from the Visual LISP menu bar. All text entered in the Console window is treated as AutoLISP code.
The default color scheme is shown in the following table.
Default color coding scheme for AutoLISP code |
|
---|---|
Color |
AutoLISP language element |
Blue |
Built-in functions and protected symbols |
Magenta |
Strings |
Green |
Integers |
Teal |
Real numbers |
Magenta, on gray background |
Comments |
Red |
Parentheses |
Black |
Unrecognized items (for example, user variables) |
The following coding example shows the advantages of using color coding to identify errors in AutoLISP code.
The previous illustration shows an AutoLISP program with standard color coding applied. With the color coding applied, you can identify the following problems: