hi everyone!
i have a question concerning local variables in pd:
i wrote an abstraction which contains a data array. this array is only relevant inside the abstraction, but i need flexible amount of instances (of the abstraction)... therefore i can't give the array a fixed name (-->warning: arr: multiply defined) neither can i use the usual way of using a $1 placeholder and which gets replaced on initialisation (because in that case i'd need to get track of the number of instances already used, etc)
so, is there either a way of using an auto-generic variable-name or a way to keep an array local, so that the multiples won't interfere.
thanks a lot
leo
hi,
so, is there either a way of using an auto-generic variable-name or a way
to
keep an array local, so that the multiples won't interfere.
thanks a lot
give it a name like $0-table. $0 is replaced with a unique variable. because this variable is a number, you cannot use "$0" alone, (arrayname can only be a symbol...) so $0- or $0t or $0ar would do it also.
sme.
hi, this is _the_ FAQ.
[table $0-bla]
the $0 is unique for every instance of every abstraction.
pix.
On Wed, 12 Feb 2003 12:39:17 +0100 "leo {depart}" oel@depart.at wrote:
hi everyone!
i have a question concerning local variables in pd:
i wrote an abstraction which contains a data array. this array is only relevant inside the abstraction, but i need flexible amount of instances (of the abstraction)... therefore i can't give the array a fixed name (-->warning: arr: multiply defined) neither can i use the usual way of using a $1 placeholder and which gets replaced on initialisation (because in that case i'd need to get track of the number of instances already used, etc)
so, is there either a way of using an auto-generic variable-name or a way to keep an array local, so that the multiples won't interfere.
thanks a lot
leo
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list