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

Home » Public Forums » archive » Re: Avoiding multiple or complex WHEREs?
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: Avoiding multiple or complex WHEREs? [message #75220] Mon, 21 February 2011 13:55 Go to next message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On Feb 21, 3:46 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Feb 21, 6:34 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
> wrote:
>
>> Ah! I think I just discovered a use for !NULL, it would fit NaN better
>> here!
>
> !null is an undefined variable. It cannot be an element of an array of
> floats or doubles. It can be come where a variable can be, such as a
> list or map element, or a pointer target.

Yeah :-/ I guess I am trying to build something like a HASH with two
keys for each value... but I could be going about this completely
backwards!
Re: Avoiding multiple or complex WHEREs? [message #75221 is a reply to message #75220] Mon, 21 February 2011 13:46 Go to previous messageGo to next message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Lesson #1: Don't post till you've tried it.
Lesson #2: can't assign !NULL to a subscripted element of an array,
a[x,y]=!null is not allowed.
Lesson #3: Don't post till you've tried it.
Re: Avoiding multiple or complex WHEREs? [message #75222 is a reply to message #75221] Mon, 21 February 2011 13:46 Go to previous messageGo to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 21, 6:34 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
wrote:
> Ah! I think I just discovered a use for !NULL, it would fit NaN better
> here!

!null is an undefined variable. It cannot be an element of an array of
floats or doubles. It can be come where a variable can be, such as a
list or map element, or a pointer target.
Re: Avoiding multiple or complex WHEREs? [message #75223 is a reply to message #75222] Mon, 21 February 2011 13:34 Go to previous messageGo to next message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Ah! I think I just discovered a use for !NULL, it would fit NaN better
here!

G
Re: Avoiding multiple or complex WHEREs? [message #75308 is a reply to message #75220] Tue, 22 February 2011 08:29 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Feb 21, 6:55 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
wrote:
> Yeah :-/ I guess I am trying to build something like a HASH with two
> keys for each value... but I could be going about this completely
> backwards!

It depends on how you are going to use it, but this problems suggests
to me making a class that overloaded the brackets, to search for what
you want, and return !null if not found. Internally it could use
hashes, lists or arrays (of values or pointer arrays). The better
choice depends on things like the number of points and whether they
form a grid in ID, whether Ts are integers (I am guessing that
particle IDs are). That way it would be usable doing things like

p_cool=p[[1,3,4],23:100]
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: RK4 and IDL's array truncation
Next Topic: howto select and deselect plotting windows?

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

Current Time: Wed Oct 08 13:53:37 PDT 2025

Total time taken to generate the page: 0.00835 seconds