\magnification=\magstephalf
\parskip=0.2cm
\parindent=1.0cm
\def\simlt{\lower.5ex\hbox{$\; \buildrel < \over \sim \;$}}
\def\simgt{\lower.5ex\hbox{$\; \buildrel > \over \sim \;$}}
\tolerance=10000

\catcode`@=11

\noindent {\bf 2. TWO WAYS TO MAKE THINGS EASIER}

	By now you might be sick of typing.  Typing involves making
mistakes and then retyping the whole line with yet different mistakes;
or perhaps wanting to enter a command that differs just a bit from a
previous one; or perhaps wanting to enter a series of commands that
differs just a bit from a previous series that you entered.  Here are
two ways to make these aspects {\it lots} easier. 

\noindent {\bf 2.1. Command-line editing:}

	In IDL (and UNIX, too!), you can use the ``up-arrow'' repeatedly 
to bring back previous
commands onto the current line, the ``down-arrow'' to ``move forward'' once
you've done this, and display a previously-typed line on the command line. 
Then you can use the ``left-arrow'',
``right-arrow'', and ``backspace'' keys to edit the line.  This feature
allows you to change a single previously-entered
command.  Very handy!

	Unfortunately, this command-line editing capability comes at a
price: you can't simultaneously have command-line editing and the scroll
bar.  By default, your windows come up without a scroll bar so
command-line editing will work unless you have changed to scroll mode. 
To change from one mode to the other, put the cursor anywhere within the
window and hit the right-hand mouse button; a little window called
``Term Pane'' will appear.  Go down to the bottom entry, which is
``Scrolling'', and hit the right-hand mouse button again, and move the
cursor to the right to get the choices between modes.  You can change
back and forth between the two modes at will. 

\noindent {\bf 2.2. Batch files:}

	Suppose you have entered a series of commands and want to repeat
the series, perhaps after making either small or large modifications. 
The easiest way to do this is with a batch file, which is simply a file
that contains the list of IDL commands you wish to run.  Once
you have generated the file with a UNIX text editor (e.g.,
``textedit''), you invoke it in IDL using the {\bf @} symbol. 

	For example, consider the series of commands you used in
experimenting with plotting in the previous section:

	{\bf original = sin( (findgen(200)/35)$\wedge$2.5)}

	{\bf original = original + 2}

	{\bf time = 3 * findgen(200)}

	{\bf plot, time, original, xtitle="Time", ytitle="amplitude", \$}

	{\bf yrange=[0.5, 3.5], xrange=[0,600], ystyle=1}
 
\noindent If you put these commands in a file called ``test.idlbatch'',
you then can invoke the commands by typing in IDL

	{\bf @test.idlbatch}

\noindent and you can then edit the file and re-invoke it at your
pleasure. Saves huge amounts of time!

	One point of detail: {\it the subdirectory in which this file 
is located}
must be the one from which you are
running IDL (or in your IDL path, as specified in your .idlenv file).

\end


