----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Jonathan Wilkes jancsika@yahoo.com Cc: Фывапр Олджэвич tofuckof@inbox.ru; PD-list pd-list@iem.at Sent: Saturday, February 18, 2012 1:20 PM Subject: Re: [PD] Pd-extended can't see $0-arrays ???
Le 2012-02-13 à 20:07:00, Jonathan Wilkes a écrit :
Do gpointers only point to scalars? Because if you _could_ get a pointer
to an array-- perhaps using my canvas 'get' method patch-- you could just make all arrays canvas local and forget all this $0- business:
AFAIK :
Pointers point either to scalars or to array elements. You can't point to a whole array in a way distinct from pointing to an element of it. Therefore, a pointer to the first element (0) of an array is the best equivalent of what would be a pointer to an array (like it is in C language).
Hm, maybe it's simpler than that:
a different canvas for arrayname. (Since (gpointer) can point to the "head" of a glist.)
This could potentially double as a way to use ds-arrays inside tabread, tabwrite~, etc., since with "set array (gpointer)" $1 could specify the name of the [struct] that is used as a template for the array and $2 could point to scalar that contains it.
It wouldn't be hard to abstraction-ize it so the user doesn't even have to think about pointers or scalars or $0.
-Jonathan
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC