Where's the syntax error? No stringst that only contain numbers? [message #50210] |
Mon, 18 September 2006 09:49  |
Ingo von Borstel
Messages: 54 Registered: September 2006
|
Member |
|
|
Hello,
when calling the plot routine, I found that I cannot use all kind of
strings as title strings:
Quote:
IDL> x = [1,2,3,4,5,6]
IDL> y = [1,2,3,4,7,8]
IDL> plot, x,y,xtitle="x",ytitle="y"
IDL> plot, x,y,xtitle="1",ytitle="2"
plot, x,y,xtitle="1",ytitle="2"
^
% Syntax error.
IDL>
I get no syntax error in the first case and one in the second. I don't
really see why. Especially as the examples are to my eyes exactly alike.
Are strings, that contain only figures not allowed?
I'm using IDL 6.1
Regards,
Ingo
--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc
If you need an urgent reply, replace newsgroups by vgap.
|
|
|
Re: Where's the syntax error? No stringst that only contain numbers? [message #50281 is a reply to message #50210] |
Tue, 19 September 2006 15:00  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Tue, 19 Sep 2006 20:58:20 +0200, F�LDY Lajos wrote:
>
> On Tue, 19 Sep 2006, JD Smith wrote:
>
>> IDL> a= "18
>> IDL> help,a
>> A INT = 1
>
>
> GDL> help, "18
> % Parser syntax error: unexpected token: 8
>
>
> FL> help, "18
> ^
> % Error: syntax error (syntax error)
>
>
> should we fix it? :-)
Not in my opinion. It's such a rare usage case, and some things
should be dropped even if it costs some minor amount of compatibility.
On a similar note, I think "()" as array subscript could also be
dropped.
|
|
|
|