Home Up Next

Subchapters:

Syntax

IDL is an interactive language. That means, you have just to type idl and you can begin to work.

Every time you have the hand (that is when IDL is not working), you can have a look to the values of the variables known by the program.
2 ways for it:

          IDL> print , tata
          IDL> help , tata

If tata is an 512X512 image for example, the print command will display all the values (262144 !), and help will just tell you what is tata:

          IDL> help , tata
                 TATA            FLOAT     = Array[512, 512]

If you use help without arguments, IDL will display the list of all variables known in the procedure/function where you stop IDL (or in the main level), and a list of all the already compiled procedures and function.

This is nice, but what is nicer, is that if your IDL program crashes, it will stay into the sub-routine where the problem was, and you "just" have to print the variables to have an idea of what's wrong.

You can also put a stop command in any place of your program where you suspect a problem, and check and modify if necessary the variables interactively after it stops.
Then just make the program continue by:

          IDL> .continue

Note the point before the continue command.

 

IDL courses C. Morisset 2004 IA/UNAM V 2.2

Home Up Next