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 procedure (it's traditional to start computing courses with a hello world program - and this one is no different).
pro hello_world ;+ ;pro hello_world ;Procedure to print ``Hello world'' to screen ; ;No parameters ;Keywords: none ;John Marsham, (01/11/06) ;- print,'Hello world' ;print the line ''Hello world'' to screen end
Note the first line states with pro then the filname (without the .pro). This is standard for IDL procedures. `;'' is a comment so ignored.
Enter idl (type ``IDL'' at the UNIX prompt)
Type
hello_worldThe program should run.