[PD] find array

Roman Haefeli reduzent at gmail.com
Thu Aug 25 15:44:26 CEST 2016


On Thu, 2016-08-25 at 12:03 +0000, Liam Goodacre wrote:
> Is there any way of querying PD to find out if a given array exists?
> I'm thinking of a dynamic patching command that says "if this array
> doesn't already exist, then create it". Unfortunately, the "multiple
> array defined" message prints to the console, not an individual
> object. 


If you don't mind causing an error message to the Pd window, you can
request something from the table and see whether you get something at
all. For instance, you can set [array size] to the table you want to
check its existence and send it a bang. When it outputs a number, the
table exists, when it outputs nothing (and prints an error to Pd
window), it does not exist.

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160825/ef8a8a13/attachment.sig>


More information about the Pd-list mailing list