Addressing Compilation Errors
When IDL encounters a compilation error — incorrect syntax or some other situation that prevents IDL from compiling the a routine — it displays a message in the Console view that contains a hypertext link to the line of code that caused compilation to halt. This allows you to quickly locate errors and recompile.
To see this feature in action, do the following:
- Open a new IDL Source File.
- Enter the following code:
- Save the file into an existing project.
- Compile the file.
PRO errorfile PRINT a ENDNote that there is no comma following the PRINT command — this is an IDL syntax error and will keep the routine from compiling.
Note the error message in the Console view:

Clicking on the underlined text opens the file containing the error and highlights the specified line.
In the editor, the line containing the error is marked with a red X:

Note also that errors are listed in the Problems view:

Here, clicking on the error in the table will display the affected file and highlight the relevant line.
Finally, both the affected file and the project that contains it are marked in the Project Explorer view:

It will, of course, be up to you to determine how to address compilation errors when they occur.