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

Home » Public Forums » archive » Q: variable dimension arrays in objects
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
Q: variable dimension arrays in objects [message #9886] Tue, 16 September 1997 00:00
Mirko Vukovic is currently offline  Mirko Vukovic
Messages: 124
Registered: January 1996
Senior Member
I quite often define objects that contain either a scalar or a variable
length (and/or dimension) vector. The only way I can doi this is via
pointers:

foo={foo,a:ptr_new(/alloc)}

and then

self.a=ptr_new(whatever), where whatever is 5. or a vector or a matrix.

But then, I need to remember that I have to use *self.a instead of
self.a

Any way around this? It would be nifty if upon object creation IDL could
know that whenever I want self.a, I really want *self.a.

Maybe I should also add why I need this. I have simple global plasma
models. Sometimes the pressure is a scalar, or sometimes a vector or
even a matrix in the particular run. Or it can be plasma density,
temperature, etc.

tia,
--
Mirko Vukovic, Ph.D 3075 Hansen Way M/S K-109
Novellus Systems Palo Alto, CA, 94304
415/424-4969 mirko.vukovic@varian.grc.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cannot make idl_container::get(isa='foo') to work
Next Topic: Reserved color

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

Current Time: Wed Oct 08 15:14:18 PDT 2025

Total time taken to generate the page: 0.00591 seconds