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

Home » Public Forums » archive » warning: (all(part1))(part2) = part2*0.
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
warning: (all(part1))(part2) = part2*0. [message #11882] Thu, 04 June 1998 00:00 Go to next message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
This will gave an error like:

print,(all(part1))(part2)
0.00000 1.00000 2.00000
% Temporary variables are still checked out - cleaning up...


I know there are many solutions to get around of this malfunctional
code.
I was really surprising me that's it gaves this message.



PRO ind_err

all = findgen(100)
part1 = findgen(10)
part2 = findgen(3)

(all(part1))(part2) = part2*0.

print,(all(part1))(part2)


END


--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
Re: warning: (all(part1))(part2) = part2*0. [message #11970 is a reply to message #11882] Fri, 05 June 1998 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
Stein Vidar Hagfors Haugan wrote:

> R. Bauer wrote:
>
>> (all(part1))(part2) = part2*0.
>
> What you're doing here is to assign values to parts of a
> temporary value, almost as if you're saying
>
> 5*all(part1) = 1
>
> since (all(part1)) is a temporary value (actually, an rvalue)
> like any other expression.
>
> I think the error here is that IDL's compiler does not protest,
> but instead generates code (seemingly) to do assignments to
> a temporary value.
>

On idl 4 the compiler is protesting if something like above is defined.I
like to have these feature back again.

Are there other differences known in compiler errors which won't be
detected itself by idl 5.x ?


> What you should do (with the intended (?) effect) is:
>
> all(part1(part2)) = part2*0

We have done it in the same way.



--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
Re: warning: (all(part1))(part2) = part2*0. [message #11971 is a reply to message #11882] Fri, 05 June 1998 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
R. Bauer wrote:

> (all(part1))(part2) = part2*0.

What you're doing here is to assign values to parts of a
temporary value, almost as if you're saying

5*all(part1) = 1

since (all(part1)) is a temporary value (actually, an rvalue)
like any other expression.

I think the error here is that IDL's compiler does not protest,
but instead generates code (seemingly) to do assignments to
a temporary value.

What you should do (with the intended (?) effect) is:

all(part1(part2)) = part2*0

Regards,

Stein Vidar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Font problems with version 5.1 under win95
Next Topic: IDL on Dual processor Linux SMP box?

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

Current Time: Wed Oct 08 13:32:36 PDT 2025

Total time taken to generate the page: 0.00633 seconds