comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Simple bug in IDL 5.4 compiler under Win2000
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27521] Mon, 29 October 2001 07:48 Go to next message
thompson is currently offline  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 Go to previous messageGo to next message
Joe Means is currently offline  Joe Means
Messages: 44
Registered: November 1996
Member
<html><head></head><body>Hmmmm.....&nbsp; I missed that one.&nbsp; 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">&lt;rtowler@u.washington.edu&gt;</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 #27572 is a reply to message #27555] Fri, 26 October 2001 05:01 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Joe Means wrote:
>
> 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
>

Dear Joseph,

my linux Version gives a much more better error statement.

distancesT = segmentT*(1d+Dindgen(numAll1Rets-2))
^
% Syntax error.


print,1e+dindgen(10)

gives the same syntax error.


I could not decide what is more wrong to set an exponent by a function
or to ignore exponents settings for double numbers by d.

I believe it is no bug but I agree that's the error statement you got
isn't very helpful.


regards

Reimar





> --
> Joseph E. Means, joe.means@orst.edu
> Department of Forest Science
> Oregon State University
> Corvallis, OR 97331-5752
> 541-750-7351

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27585 is a reply to message #27572] Thu, 25 October 2001 15:05 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> I agree! I thought you were on to something too but I personally don't use
> the word since I have eaten it so much and have lost the taste for it.
> Someone like Dick always comes along and points out your mistakes. If only
> I knew everything...

This particular "bug" caused me about a 100 gray hairs
and nearly a half a day in an IDL programming course
I once taught. It's one of the reasons I because so
anal about code "looking" right. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27587 is a reply to message #27585] Thu, 25 October 2001 14:45 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
> 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.

I agree! I thought you were on to something too but I personally don't use
the word since I have eaten it so much and have lost the taste for it.
Someone like Dick always comes along and points out your mistakes. If only
I knew everything...

-Rick


"Joe Means" wrote in message news:3BD86BE0.10908@orst.edu...
> 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
>
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27596 is a reply to message #27587] Thu, 25 October 2001 12:45 Go to previous messageGo to next message
Joe Means is currently offline  Joe Means
Messages: 44
Registered: November 1996
Member
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

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 #27597 is a reply to message #27596] Thu, 25 October 2001 12:44 Go to previous messageGo to next message
Dick Jackson is currently offline  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 #27600 is a reply to message #27597] Thu, 25 October 2001 12:02 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
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
>
Re: Simple bug in IDL 5.4 compiler under Win2000 [message #27668 is a reply to message #27521] Mon, 29 October 2001 09:43 Go to previous message
Foldy Lajos is currently offline  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 Go to previous message
tam is currently offline  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
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 5.5 jpeg and tiff
Next Topic: How-to? color png

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:01:13 PDT 2025

Total time taken to generate the page: 0.00511 seconds