<div dir="ltr"><div><div><div>Thank you both very much for the explanations. So if I got it right, the loop in itself was behaving as expected, but what was being printed in the console was not reflecting that. Instead print behaved like a list prepend.<br></div>That's good to know, I candidly thought that print objects were printing out stuff in real time irrespective of what was going on in the rest of the patch.<br><br></div>Cheers,<br><br></div>Pierre.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-03 19:47 GMT+02:00 Jan Baumgart <span dir="ltr"><<a href="mailto:raga.raga@gmx.de" target="_blank">raga.raga@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You need to trigger the print before the recursion branch.<br>
<br>
Because you have the print _after_ the recursion branch, the prints can only get triggered after the complete recursion has stopped.<br>
<br>
That's why the output is reversed in order.<br>
<br>
Take a look at pd manual: 2.3.2. depth first message passing<br>
<br>
Cheers,<br>
jan<div><div class="h5"><br>
<br>
On 06/02/2015 11:10 PM, Pierre Massat wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Dear list,<br>
<br>
I just ran into something very odd while trying to parse a string to<br>
extract a filename from a path with [list fromsymbol].<br>
Please look at the patch attached. I try to loop backward through the<br>
fields of a line in a [text] object to find the first "/" (code 47).<br>
<br>
When I do it "manually" (load the list and get the last field, then<br>
decrease the counter with a bang until I reach the last "/", everything<br>
works fine, and the counter starts at 17 and goes down.<br>
<br>
But when I try to automate it by checking if the output equals 47 and by<br>
sending a bang to my counter when it's not, I get a very strange result.<br>
The counter actually starts at the last occurrence of "/" (47) in field<br>
8, and then goes up to 17.<br>
<br>
I am probably very tired and I must be missing something obvious. But<br>
right now this looks like aliens have hacked into Pd and are playing<br>
with my nerves.<br>
<br>
Thanks in advance for your help,<br>
Pierre.<br>
<br>
PS : I've been using the new text and array objects and I think they're<br>
very useful, though not always super intuitive.<br>
<br>
<br></div></div><span class="">
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Jan Baumgart<br>
Technischer Mitarbeiter<br>
Hochschule für Musik und Darstellende Kunst<br>
Eschersheimer Landstr. 29-39<br>
60322 Frankfurt am Main<br>
</font></span></blockquote></div><br></div>