Q: variable dimension arrays in objects [message #9886] |
Tue, 16 September 1997 00:00 |
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
|
|
|