Open Declaration

Open Declaration helps you quickly see the definition of a selected routine (procedure, function, or object method) in .pro code. This saves you time searching for the correct file or line of the routine definition.

If the routine is defined in the same .pro file, Open Declaration highlights that part of the file. If the routine is defined in another file or in the IDL library, Open Declaration not only opens the file where the routine is declared, but also highlights the line of the routine definition.

The best way to understand this functionality is to make a simple .pro file that calls an IDL function, such as DIST.

  1. In the IDL Workbench, open a new Editor by clicking on the ed_open_file.gif icon or selecting File → New → Untitled Text File.
  2. Copy the following program into the Editor:
  3. ; Display the results of DIST as an image:  
       TVSCL, DIST(100) 
       end 
    
  4. Press the Ctrl key and click on the routine.
  5. The dist.pro file opens in another Editor, with the DIST function definition highlighted.

You can access the Open Declaration feature in any of the following ways: