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

Home » Public Forums » archive » Initializing object array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Initializing object array [message #38595 is a reply to message #38491] Fri, 12 March 2004 08:48 Go to previous messageGo to previous message
Stein Vidar Hagfors H[2] is currently offline  Stein Vidar Hagfors H[2]
Messages: 28
Registered: October 2002
Junior Member
David Fanning <david@dfanning.com> writes:

> JD Smith writes:
>
>> An object container is just a fancy wrapper around using a pointer to hold
>> a bunch of objects. So you can go either way. I personally prefer the
>> transparency of using your own pointer.
>
> I don't know. It's not just fancy, I think it's elegant.
> For holding objects, I really do prefer a container. :-)

Isn't it more awkward to e.g. loop in a one-line statement over the
contents of a container?

Anyhow, here is what I think you were *really* trying to do in the
first place:

FUNCTION MyProg::INIT, a
self.c = ptr_new(a)
RETURN, 1
END

PRO MyProg__Define
class = {MYPROG, c:Obj_New()}
END

And *self.c would be the array "a" of object pointers.

------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Tel.: 1-301-286-9028
Mail Code 682.3, Bld. 26, Room G-1, Cell: 1-240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: append a matrix after a .dat file which stores all similar matrix
Next Topic: Re: append a matrix after a .dat file which stores all similar matrix

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

Current Time: Fri Oct 10 06:57:21 PDT 2025

Total time taken to generate the page: 1.43868 seconds