[DGD]Dynamic Array of Objects ?
    Michel Racicot 
    mracicot at zebra-soft.com
       
    Tue Feb 20 19:50:19 CET 2001
    
    
  
  Well, that is really great! (and usefull...) The documentation i got for
LPC code was kind of very mysterious with that kind of stuff...
  But, there is still one more question :
  Doesn't allocate return a mixed * instead of a object * ???
  Thank you a lot!
  JesterX
> On Tue, Feb 20, 2001 at 11:11:08AM -0500, Michel Racicot wrote:
> > Hi there
> >
> >   How can i do a dynamic array of objects ?
> >
> >   like :
> >   object * lstExits;
> >
> >   How can i add something to this array ? (There are no allocate
functions for that kind of stuff!!!)
>
> Pardon?  You mean something like the allocate() kfun?  Example:
>
>     lstExits = allocate(4);
>
> This will create an array of size 4 with nil for each entry, identical
> to doing this:
>
>     lstExits = ({ nil, nil, nil, nil });
>
> If you want to add more entries, the + operator will be most helpful:
>
>     lstExits += allocate(3);
>
> Which does the same as:
>
>     lstExits += ({ nil, nil, nil });
>
> Erwin.
> --
> Erwin Harte         :    `Don't mind Erwin, he gets crabby. :)'
> harte at xs4all.nl     :       -- Par Winzell <zell at skotos.net>
>
> List config page:  http://list.imaginary.com/mailman/listinfo/dgd
List config page:  http://list.imaginary.com/mailman/listinfo/dgd
    
    
More information about the DGD
mailing list