Re: How do you like this? [message #13069] |
Thu, 01 October 1998 00:00 |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <3612A7CF.41C6@io.harvard.edu> Martin Schultz
<mgs@io.harvard.edu> writes:
> On the command prompt try:
> IDL> for i=0,10 do begin &$ plot,findgen(20),col=1 &$ endfor
> IDL> window,xsi=500,ysi=500
>
> What happens on my system is nothing after I enter the first line, then
> 10 windows opening and closing after the second line.
And that's as it should be, I think. The dollar sign says that the
line is "to be continued". Anything appearing after the dollar sign
(on the same line) is discarded (as a comment):
IDL> print,$ This is a comment
IDL> "HELLO"
HELLO
However, I wouldn't recommend using this behaviour to save a
character in front of comments on long lines, because I don't know
how explicitly this behaviour is documented.
You may find the following way of writing your loop interesting,
though:
IDL> for i=0,10 do begin &$
IDL> plot,findgen(20),col=1 &$
IDL> endfor
Regards,
Stein Vidar
|
|
|