[PD] expr size() refuses some array names
Matteo Sisti Sette
matteosistisette at gmail.com
Sat Mar 27 20:57:07 CET 2010
Hi,
When trying to use [expr size("arrayname")] to get the size of an array,
some array names that are legal in Pd will cause (sometimes funny)
syntax errors in [expr].
It seems that for example:
- array name cannot start with a number (or a $n)
(it can contain a number or dollar in the middle or end)
- array name cannot contain a minus sign ("-")
(nor I guess *, + and /)
and maybe other restrictions.
For example:
1) [expr size("$0foo")]
expr: syntax error: 1005foo")
2) [expr size("$1foo")]
expr: syntax error: $1foo")
3) [expr size("foo-bar")]
expr: syntax error: missing '"'
Seems like quotes are not treated quite like one would expect...
Is there a way to work it around, or do you have to restrict array names
(of which you're gonna need to know the size) to the typical rules that
apply to identifier names in many popular programming languages? (but
then, why are quotes needed at all??)
thanks
m.
--
Matteo Sisti Sette
matteosistisette at gmail.com
http://www.matteosistisette.com
More information about the Pd-list
mailing list