[PD] Patch acting weird with Pd 0.46.6

Pierre Massat pimassat at gmail.com
Tue Jun 2 23:10:19 CEST 2015


Dear list,

I just ran into something very odd while trying to parse a string to
extract a filename from a path with [list fromsymbol].
Please look at the patch attached. I try to loop backward through the
fields of a line in a [text] object to find the first "/" (code 47).

When I do it "manually" (load the list and get the last field, then
decrease the counter with a bang until I reach the last "/", everything
works fine, and the counter starts at 17 and goes down.

But when I try to automate it by checking if the output equals 47 and by
sending a bang to my counter when it's not, I get a very strange result.
The counter actually starts at the last occurrence of "/" (47) in field 8,
and then goes up to 17.

I am probably very tired and I must be missing something obvious. But right
now this looks like aliens have hacked into Pd and are playing with my
nerves.

Thanks in advance for your help,
Pierre.

PS : I've been using the new text and array objects and I think they're
very useful, though not always super intuitive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150602/f97bdcca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: weirdo.pd
Type: text/x-puredata
Size: 1355 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150602/f97bdcca/attachment.bin>


More information about the Pd-list mailing list