Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27521] |
Mon, 29 October 2001 07:48  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
Joe Means <joe.means@orst.edu> writes:
> Rick,
> Regarding your question about whether this behavior is a bug, my
> rationale for saying so is that it the offending statement contains no
> incorrect IDL syntax that I can see.
> Joe
Actually, I would argue that writing a number as simply "1d" is incorrect
syntax, or at least sloppy syntax. IDL lets you get away with it in most cases
(obviously not here), but the number really should be written as "1d0".
Sorry, I don't mean to come off as harsh.
William Thompson
> Rick Towler wrote:
>> Bug? I don't know.
>>
>> But I can confirm that as written, I get the same error in IDL 5.4 and
>> 5.5(beta) on Win2k and in IDL 5.3 and 5.4.1 on Solaris (sunos sparc).
>>
>> FWIW, if you put spaces around your "+" you don't get the error:
>>
>> -Rick
>>
>>
>> "Joe Means" wrote in message news:3BD85C6F.8040606@orst.edu...
>>
>>> This looks like a simple bug in the IDL 5.4 compiler under Windows2000.
>>> If others confirm this, then RSI you may want to take note. Perhaps it
>>> is fixed in 5.5 which I cannot afford yet.
>>>
>>> PRO Showbug
>>>
>>> numAll1Rets = 6
>>> segmentT = 2d
>>>
>>> distancesT = segmentT*(Dindgen(numAll1Rets-2)+1d)
>>>
>>> distancesT = segmentT*(1d+Dindgen(numAll1Rets-2))
>>> ;This second statement generates a compile error:
>>> ;%Syntax error.
>>>
>>> Return
>>> End
>>>
> --
> Joseph E. Means
> Assistant Professor, joe.means@orst.edu
> Department of Forest Science
> Oregon State University
> Corvallis, OR 97331-5752
> 541-750-7351
|
|
|
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27555 is a reply to message #27521] |
Fri, 26 October 2001 12:16   |
Joe Means
Messages: 44 Registered: November 1996
|
Member |
|
|
<html><head></head><body>Hmmmm..... I missed that one. Thanks, Dick.<br>
Cheers,<br>
Joe<br>
<br>
Dick Jackson wrote:<br>
<blockquote type="cite" cite="mid:qYZB7.6292$4H1.13032@shaw-ty2">
<blockquote type="cite"><pre wrap="">"Joe Means" wrote in message <a class="moz-txt-link-freetext" href="news:3BD85C6F.8040606@orst.edu">news:3BD85C6F.8040606@orst.edu</a>...<br></pre><blockquote type="cite"><pre wrap="">This looks like a simple bug in the IDL 5.4 compiler under Windows2000.<br>If others confirm this, then RSI you may want to take note. Perhaps it<br>is fixed in 5.5 which I cannot afford yet.<br><br>PRO Showbug<br><br> numAll1Rets = 6<br> segmentT = 2d<br><br> distancesT = segmentT*(Dindgen(numAll1Rets-2)+1d)<br><br> distancesT = segmentT*(1d+Dindgen(numAll1Rets-2))<br> ;This second statement generates a compile error:<br> ;%Syntax error.<br><br>Return<br>End<br></pre></blockquote></blockquote >
<pre wrap=""><!----><br>"Rick Towler" <a class="moz-txt-link-rfc2396E" href="mailto:rtowler@u.washington.edu"><rtowler@u.washington.edu></a> wrote in message<br><a class="moz-txt-link-freetext" href="news:9r9nld$26e6$1@nntp6.u.washington.edu">news:9r9nld$26e6$1@nntp6.u.washington.edu</a>...<br></pre>
<blockquote type="cite"><pre wrap="">Bug? I don't know.<br><br>But I can confirm that as written, I get the same error in IDL 5.4 and<br>5.5(beta) on Win2k and in IDL 5.3 and 5.4.1 on Solaris (sunos sparc).<br><br>FWIW, if you put spaces around your "+" you don't get the error:<br><br>-Rick<br></pre></blockquote>
<pre wrap=""><!----><br>Right, and that would be because, for example, the constant 1d+3 means<br>1*10^3, double precision. 1d+D... is just not allowed. Rick's suggestion is<br>good, or if you prefer:<br><br>distancesT = segmentT*(1d0+Dindgen(numAll1Rets-2))<br><br>distancesT = segmentT*((1d)+Dindgen(numAll1Rets-2))<br><br>Cheers,<br >--<br>-Dick<br><br>Dick Jackson / <a class="moz-txt-link-abbreviated" href="mailto:dick@d-jackson.com">dick@d-jackson.com</a><br>D-Jackson Software Consulting / <a class="moz-txt-link-freetext" href="http://www.d-jackson.com">http://www.d-jackson.com</a><br>Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392<br><br><br></pre>
</blockquote>
<br>
<pre class="moz-signature">--
Joseph E. Means
Assistant Professor, <a class="moz-txt-link-abbreviated" href="mailto:joe.means@orst.edu">joe.means@orst.edu</a>
Department of Forest Science
Oregon State University
Corvallis, OR 97331-5752
541-750-7351</pre>
<br>
</body></html>
|
|
|
|
|
|
|
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27597 is a reply to message #27596] |
Thu, 25 October 2001 12:44   |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
> "Joe Means" wrote in message news:3BD85C6F.8040606@orst.edu...
>> This looks like a simple bug in the IDL 5.4 compiler under Windows2000.
>> If others confirm this, then RSI you may want to take note. Perhaps it
>> is fixed in 5.5 which I cannot afford yet.
>>
>> PRO Showbug
>>
>> numAll1Rets = 6
>> segmentT = 2d
>>
>> distancesT = segmentT*(Dindgen(numAll1Rets-2)+1d)
>>
>> distancesT = segmentT*(1d+Dindgen(numAll1Rets-2))
>> ;This second statement generates a compile error:
>> ;%Syntax error.
>>
>> Return
>> End
"Rick Towler" <rtowler@u.washington.edu> wrote in message
news:9r9nld$26e6$1@nntp6.u.washington.edu...
> Bug? I don't know.
>
> But I can confirm that as written, I get the same error in IDL 5.4 and
> 5.5(beta) on Win2k and in IDL 5.3 and 5.4.1 on Solaris (sunos sparc).
>
> FWIW, if you put spaces around your "+" you don't get the error:
>
> -Rick
Right, and that would be because, for example, the constant 1d+3 means
1*10^3, double precision. 1d+D... is just not allowed. Rick's suggestion is
good, or if you prefer:
distancesT = segmentT*(1d0+Dindgen(numAll1Rets-2))
distancesT = segmentT*((1d)+Dindgen(numAll1Rets-2))
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|
|
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27668 is a reply to message #27521] |
Mon, 29 October 2001 09:43  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
Hi,
IDL regards 1d+ as a double constant. Try 'help, 1d+' or 'a=1d+'. Both
works. Try 'a=1d+x'. It gives a syntax error: a constant followed by a
variable. So this '1d+ is a double constant in IDL' syntax is weird.
regards,
Lajos Foldy
On 29 Oct 2001, William Thompson wrote:
> Joe Means <joe.means@orst.edu> writes:
>
>> Rick,
>> Regarding your question about whether this behavior is a bug, my
>> rationale for saying so is that it the offending statement contains no
>> incorrect IDL syntax that I can see.
>> Joe
>
> Actually, I would argue that writing a number as simply "1d" is incorrect
> syntax, or at least sloppy syntax. IDL lets you get away with it in most cases
> (obviously not here), but the number really should be written as "1d0".
>
> Sorry, I don't mean to come off as harsh.
>
> William Thompson
>
>
>> Rick Towler wrote:
>
>>> Bug? I don't know.
>>>
>>> But I can confirm that as written, I get the same error in IDL 5.4 and
>>> 5.5(beta) on Win2k and in IDL 5.3 and 5.4.1 on Solaris (sunos sparc).
>>>
>>> FWIW, if you put spaces around your "+" you don't get the error:
>>>
>>> -Rick
>>>
>>>
>>> "Joe Means" wrote in message news:3BD85C6F.8040606@orst.edu...
>>>
>>>> This looks like a simple bug in the IDL 5.4 compiler under Windows2000.
>>>> If others confirm this, then RSI you may want to take note. Perhaps it
>>>> is fixed in 5.5 which I cannot afford yet.
>>>>
>>>> PRO Showbug
>>>>
>>>> numAll1Rets = 6
>>>> segmentT = 2d
>>>>
>>>> distancesT = segmentT*(Dindgen(numAll1Rets-2)+1d)
>>>>
>>>> distancesT = segmentT*(1d+Dindgen(numAll1Rets-2))
>>>> ;This second statement generates a compile error:
>>>> ;%Syntax error.
>>>>
>>>> Return
>>>> End
>>>>
>
>> --
>> Joseph E. Means
>> Assistant Professor, joe.means@orst.edu
>> Department of Forest Science
>> Oregon State University
>> Corvallis, OR 97331-5752
>> 541-750-7351
>
>
|
|
|
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27670 is a reply to message #27521] |
Mon, 29 October 2001 08:55  |
tam
Messages: 48 Registered: February 2000
|
Member |
|
|
I note that my old version 4 IDL User's Guide explicitly describes 1D as
a double precision constant (p 3-3). Same is true in V5's
Building IDL Applications (p 15). In the context of describing doubles
whose values happen to be integral, I don't see why it's any sloppier
than the equivalent 1B or 1L used for other types.
Regards,
Tom McGlynn
William Thompson wrote:
>
> Joe Means <joe.means@orst.edu> writes:
>
>> Rick,
>> Regarding your question about whether this behavior is a bug, my
>> rationale for saying so is that it the offending statement contains no
>> incorrect IDL syntax that I can see.
>> Joe
>
> Actually, I would argue that writing a number as simply "1d" is incorrect
> syntax, or at least sloppy syntax. IDL lets you get away with it in most cases
> (obviously not here), but the number really should be written as "1d0".
>
> Sorry, I don't mean to come off as harsh.
>
> William Thompson
>
|
|
|