IDL Basics
The Official Introduction To (PDF)

Arrays
Arrays contain data, usually more than
one value. We can define arrays of different 'type'
x=intarr(n), where n is how many elements, in this
case, in a 1-dimensional integer
array
x=fltarr(n), where n is how many
elements, in this case, in a 1-dimensional real array
x=strarr(n), where n is how many elements, in this
case, in a 1-dimensional string
array
Arrays can have more than 1 dimension
x=fltarr(10,20)
Subscripts
IDL counts from zero, not one. When
refering to an array subsrcipt, the first element is the zeroth
element. e.g. print,x(0) to print the first value stored in an array
called x.
Procedures
if using procedures, the main program
body needs to be named after the IDL file name, e.g. convert.pro needs
'pro convert' at the top of the program in the editor
Running programs
Edit the code using the text editor in
IDL. To execute the program, use the following, which can be done using
“shortcut keys”, i.e. ‘save’ (CNTL-s), ‘compile’ (SHIFT-F5), then ‘run’
(F5) are the 3 things to do each time you modify the code. If you
encounter a runtime error, it may help to reset using: CNTL-R.