empty pointer

Miller Puckette mpuckett at man104-1.ucsd.edu
Sun Jan 14 02:50:59 CET 2001


Hi all,

To find out if a list is empty, set a pointer to it and send it "next".
You'll either get an object out the left (which you can convert to "bang"
with a "t b" object) or one out the right if there are no more.

There's no way to remove a single object from a list; all you can do
is clear the whole thing out.  This is because of the way I'm protecting
against stale pointers...

cheers
Miller

On Thu, Jan 04, 2001 at 11:11:41PM +1030, pix at test.at wrote:
> i'm just starting to look at the data-structures stuff, so i apologise if
> any of this is nonsensical.
> 
> is there a way to 'select' the empty pointer? (that is, detect that the
> pointer you are being sent is empty.. and then avoid handing it into a
> get/set object).
> 
> is there a way to determine if a list is empty? i'd like to
> implement a kind of circular list by sending the rightmost output of the
> pointer object into a "traverse ..., next" object, without having it freak
> out if the list is empty.
> 
> is there an object for removing a pointer from a list? in the wame way
> you can append one, without opening the data window in edit mode and
> manually selecting/deleting it.
> 
> pix.
> 
> 



More information about the Pd-list mailing list