next up previous contents
Next: Some simple sums Up: Section 1: A first Previous: Section 1: A first   Contents

A first program

From your home directory (use ``cd'' in UNIX). Open a file called hello_world.pro (use ``emacs'', ``xemacs'', ``vi'', or whatever you are familiar with). Put the lines below in this file. This is your first IDL program (it's traditional to start computing courses with a hello world program -- and this one is no different).

print,'Hello world' 

end

Enter idl (type ``IDL'' at the UNIX prompt)

Type

.run hello_world
The program should run, printing to your IDL screen. Note that you always need an ``end'' at the end of an IDL file.



John Marsham 2009-12-07