<div dir="ltr">Forgot to post this (a draft was never sent for some reason):<div><br></div><div>Another update. I further refined this process (hopefully for the better). Now you can have multiple escaped arguments in a single iemgui label/send/receive, array name, and/or gatom label. This, however, needs to be thoroughly tested. All, please test and report.<div><br></div><div>Thank you.</div><div><br></div><div>Best,</div><div><br></div><div>Ico</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 1:07 AM, Ivica Bukvic <span dir="ltr"><<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK, try the latest commit. Basically, it only converts the # into $ if it is not followed by a numerical digit that may suggest it is an arg rather than a string.<div><br></div><div>There are still weird/illogical ways of breaking this, something that vanilla also exhibits. For instance, having:</div><div><br></div><div>A#0B will expand #0 into patch's instance</div><div><br></div><div>Whereas</div><div><br></div><div>A$0B will truncate $</div><div><br></div><div>OTOH, both $0AB and #0AB reflect the same behavior...</div><div><br></div><div>Any thoughts on this?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 4:16 PM, Ivica Ico Bukvic <span dir="ltr"><<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span>
<br>
<br>
<div>On 12/6/2015 1:03 PM, Albert Graef
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sun, Dec 6, 2015 at 5:14 PM, Ivica
Ico Bukvic <span dir="ltr"><<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> To get a better
idea what I am doing here, is # only used at the
beginning of a string (e.g. #0-something or #1), or can
it be used anywhere (e.g. boo-#0 or blah#2boo)? Also,
should it be escaped only if it is followed by a number?
(e.g. #0 should be escaped, whereas # or #abc should
not). <br>
</div>
</blockquote>
<div><br>
</div>
<div>AFAICT, this is only used with the built-in non-IEM
number and symbol boxes (floatatom and symbolatom) in
stored patch files. The # must be followed by a number.
Apparently the #0, #1 etc.can occur anywhere in the
send/receive symbol (I tested with stuff like foo-#0-bar
and it works as expected). $0 aka #0 expands to the unique
patch id, while $i aka #i expands to the ith creation
argument of the abstraction in its mother patch, if any.<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> If you can provide
some clarification what are traditional uses of this,
perhaps I can put in some filtering to figure out how we
can hopefully address both scenarios.<br>
</div>
</blockquote>
<div><br>
</div>
<div>That would be great.<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Finally, why do we
even have #0 when one can simply write $0?<br>
</div>
</blockquote>
<div><br>
</div>
<div>Max compatibility? Plain old cruft? I have no idea,
you'll have to ask Miller. ;-)<br>
<br>
The number and symbol boxes seem to be the only places
where this "convenience" is in use, everywhere else
(including the IEM GUI objects) the $i's are stored as \$i
(which, incidentally, also works with number and symbol
boxes in reading a patch, but both vanilla and extended Pd
insist on storing it again as #i when writing the patch).
At least that's what I could deduce from playing around
with a few test patches.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br></span>
Wouldn't it be easier then to simply edit all such instances to use
exclusively # since they are interchangeable and be done with this?
A simple search and replace shell script would fix all your patches
in a single run (assuming your script is intelligent to find all of
them or if they are co-located in the same folder).<br>
<br>
<blockquote type="cite"><span>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>Albert<br>
</div>
</div>
<br>
-- <br>
<div>
<div dir="ltr">Dr. Albert Gr"af<br>
Computer Music Research Group, JGU Mainz, Germany<br>
Email: <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a><br>
WWW: <a href="https://plus.google.com/+AlbertGraef" target="_blank">https://plus.google.com/+AlbertGraef</a></div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</span><span><pre>_______________________________________________
L2Ork-dev mailing list
<a href="mailto:L2Ork-dev@disis.music.vt.edu" target="_blank">L2Ork-dev@disis.music.vt.edu</a>
<a href="http://disis.music.vt.edu/listinfo/l2ork-dev" target="_blank">http://disis.music.vt.edu/listinfo/l2ork-dev</a></pre>
</span></blockquote>
<br>
</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>