Re: bug or feature? [message #66147] |
Thu, 16 April 2009 13:01 |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
<lbnc@lbnc.de> wrote in message
news:ac79dbba-9bab-4486-b29a-815b429e6a6a@h28g2000yqd.google groups.com...
> Hi there,
...
>
> IDL>plot, indgen(23), indgen(23), xminor $
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: PLOT: Incorrect number of arguments.
>
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: Syntax error.
Wild Guess (and referring to the fact you cannot reproduce it).
you had no space between xminor, and the $
when you got the error.
It though you were passing 3 arrays, hence the error.
cheers,
bob
|
|
|
Re: bug or feature? [message #66153 is a reply to message #66147] |
Thu, 16 April 2009 04:50  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
lbnc@lbnc.de schrieb:
> Hi there,
>
> in the IDL 6.3 documentation it says:
>
> Dollar Sign ($)
> The dollar sign at the end of a line indicates that the current
> statement is continued on the following line. The dollar sign
> character can appear anywhere a space is legal except within a string
> constant or between a function name and the first open parenthesis.
> Any number of continuation lines are allowed.
>
> So I do:
>
> IDL>plot, indgen(23), indgen(23), xminor = 4
>
> Lovely! However:
>
> IDL>plot, indgen(23), indgen(23), xminor $
> plot, indgen(23), indgen(23), xminor $
make sure if it happens also after you have started idl or did a .reset.
cheers
Reimar
> ^
> IDL: PLOT: Incorrect number of arguments.
>
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: Syntax error.
>
> No good. But I can do:
>
> IDL>plot, indgen(23), indgen(23), xminor = $
> IDL> 4
>
> So anyway, seems like the documentation is wrong. Maybe. Depends how
> you define "string constant" but I would not include the assign
> operator "=" as part of it.
>
> Come to think of it, I should probably report that to ITTVIS instead
> of posting it here...
>
> Cheers
> Lasse
|
|
|
Re: bug or feature? [message #66154 is a reply to message #66153] |
Thu, 16 April 2009 04:50  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
lbnc@lbnc.de schrieb:
> On 16 Apr, 11:52, James Kuyper <jameskuy...@verizon.net> wrote:
>> You have just given the plot command 7 arguments. The $ character makes
>> the above pair of lines equivalent to a single line:
>>
>> plot, indgen(23), indgen(23), xminor plot, indgen(23), indgen(23), xminor
>>
>
> No, I haven't. And I would show you if I could reproduce the error.
> But magic has happened and I cannot get IDL to complain anymore. Hence
> I now agree with Carsten. Strangely. Except when you do
I don't see magic.
>
> IDL>plot, indgen(23), indgen(23), xminor$
>
> because then the $ is, of course, part of the variable name.
>
> Ah well
> Lasse
works in 7.0
IDL> plot, indgen(23), indgen(23) $
IDL> ,xstyle=1
IDL> plot, indgen(23), indgen(23), xminor $
IDL> =4
cheers
Reimar
|
|
|
Re: bug or feature? [message #66155 is a reply to message #66154] |
Thu, 16 April 2009 04:17  |
lbnc
Messages: 15 Registered: January 2005
|
Junior Member |
|
|
On 16 Apr, 11:52, James Kuyper <jameskuy...@verizon.net> wrote:
>
> You have just given the plot command 7 arguments. The $ character makes
> the above pair of lines equivalent to a single line:
>
> plot, indgen(23), indgen(23), xminor plot, indgen(23), indgen(23), xminor
>
No, I haven't. And I would show you if I could reproduce the error.
But magic has happened and I cannot get IDL to complain anymore. Hence
I now agree with Carsten. Strangely. Except when you do
IDL>plot, indgen(23), indgen(23), xminor$
because then the $ is, of course, part of the variable name.
Ah well
Lasse
|
|
|
Re: bug or feature? [message #66156 is a reply to message #66155] |
Thu, 16 April 2009 03:52  |
jameskuyper
Messages: 79 Registered: October 2007
|
Member |
|
|
lbnc@lbnc.de wrote:
> Hi there,
>
> in the IDL 6.3 documentation it says:
>
> Dollar Sign ($)
> The dollar sign at the end of a line indicates that the current
> statement is continued on the following line. The dollar sign
> character can appear anywhere a space is legal except within a string
> constant or between a function name and the first open parenthesis.
> Any number of continuation lines are allowed.
>
> So I do:
>
> IDL>plot, indgen(23), indgen(23), xminor = 4
>
> Lovely! However:
>
> IDL>plot, indgen(23), indgen(23), xminor $
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: PLOT: Incorrect number of arguments.
You have just given the plot command 7 arguments. The $ character makes
the above pair of lines equivalent to a single line:
plot, indgen(23), indgen(23), xminor plot, indgen(23), indgen(23), xminor
I hope you can understand why IDL complains about that command?
> IDL>plot, indgen(23), indgen(23), xminor = $
> IDL> 4
>
> So anyway, seems like the documentation is wrong. Maybe. Depends how
> you define "string constant" but I would not include the assign
> operator "=" as part of it.
I don't see how you reach that conclusion. String constants have nothing
to do with this.
|
|
|
Re: bug or feature? [message #66157 is a reply to message #66156] |
Thu, 16 April 2009 03:51  |
Carsten Lechte
Messages: 124 Registered: August 2006
|
Senior Member |
|
|
lbnc@lbnc.de wrote:
> IDL>plot, indgen(23), indgen(23), xminor $
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: PLOT: Incorrect number of arguments.
>
> plot, indgen(23), indgen(23), xminor $
> ^
> IDL: Syntax error.
FWIW:
IDL Version 6.4 (linux x86 m32). (c) 2007, ITT Visual Information Solutions
IDL> plot, indgen(23), indgen(23), xminor = 4
IDL> plot, indgen(23), indgen(23), xminor $
IDL> =4
IDL>
no error.
chl
|
|
|