<div dir="ltr">Thanks Jonathan for the detailed response and pointer to the docs. As a longtime (but somewhat sporadic) PD user this list behavior still becomes a bit fuzzy to me sometimes, and this helps make it much more clear.<div>
<br></div><div>-s</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 20, 2014 at 1:30 PM, Jonathan Wilkes <span dir="ltr">&lt;<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif">I&#39;m not sure why the people replying to you are feigning ignorance on how this situation could possibly be confusing.  You&#39;re chopping off the word &quot;one&quot; with [list split] and leaving it intact on the other message; yet the dollarsign substitution gives you the same output in both cases.  Furthermore, if you use [list length] on each message you will find the two message have a different number of elements.<br>
<br>What you don&#39;t see, however, is that [list] objects like [list split] interpret incoming messages as &quot;list&quot; messages-- that is, they add the word &quot;list&quot; to the beginning of the message.  Also, they prepend a &quot;list&quot; selector to the messages they send out (except for [list trim], of course).<br>
<br>But we&#39;re not done.  The selectors &quot;list&quot;, &quot;float&quot;, and &quot;symbol&quot; are
 special and do not get counted as elements with [list length].  Yet inside message boxes they _do_ get counted as the selector (i.e., the very first symbol atom in a message) when variable substitution is involved.<br><br>
Once you know those two details it gets a little easier to grasp.<br><br>This is all further complicated by the fact that there is no dollarsign variable in Pd that can get the selector of an incoming message.  So for &quot;list two three&quot; you can&#39;t get &quot;list&quot; with a dollarsign variable, and likewise for &quot;one two three&quot; you can&#39;t get &quot;one&quot; with a dollarsign variable.  That&#39;s a real sticking point for new users, especially because they&#39;ve no doubt already seen how seamlessly everything works when only numbers are involved.<br>
<br>So I&#39;d suggest everyone have a look at the help patch for [list], especially the subpatch labeled [pd about-lists].  In it, Miller Puckette-- the guy who designed and implemented this part of the
 language-- describes what is happening in some detail.  In his explanation he questions his own design, even going so far as calling the very distinction you point out here &quot;ugly&quot;.  It&#39;s not the easiest part of Pd to understand, and it&#39;s the reason why you&#39;re having a problem in the patch example you gave.<br>
<br>But if you learn to use the [list] family objects when dealing with data messages it can makes things a lot easier.  Since you know those objects will output messages with a &quot;list&quot; selector, then for everything other than a bang you&#39;re guaranteed that [$1( will work properly.<br>
<br>-Jonathan<br><div style="display:block"> <br> <br> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">
 <div dir="ltr"> <font face="Arial"> On Monday, January 20, 2014 11:33 AM, Jack &lt;<a href="mailto:jack@rybn.org" target="_blank">jack@rybn.org</a>&gt; wrote:<br> </font> </div>  <div>Le 20/01/2014 15:34, <a shape="rect" href="mailto:rolfm@dds.nl" target="_blank">rolfm@dds.nl</a> a écrit :<br clear="none">
&gt; dear list,<br clear="none">&gt;<br clear="none">&gt; i&#39;m confused about the $1 replacement in messages.<br clear="none">&gt;<br clear="none">&gt; [one two three(<br clear="none">&gt; |\<br clear="none">&gt; | \<br clear="none">
&gt; |  [list split 1]<br clear="none">&gt; |      /<br clear="none">&gt; |     /<br clear="none">&gt; |    /<br clear="none">&gt; |   /<br clear="none">&gt; |<br clear="none">&gt; [;<br clear="none">&gt; [this $1 $2(<br clear="none">
&gt;<br clear="none">&gt; [r this]<br clear="none">&gt; |<br clear="none">&gt; [print this]<br clear="none">&gt;<br clear="none">&gt; output:<br clear="none">&gt; this: two three<br clear="none">&gt; this: two three<br clear="none">
&gt;<br clear="none">&gt; why?<br clear="none">&gt;<br clear="none">&gt; rolf<br clear="none">&gt;<br clear="none">&gt;<br clear="none">&gt; _______________________________________________<br clear="none">&gt; <a shape="rect" href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br clear="none">
&gt; UNSUBSCRIBE and account-management -&gt;<br clear="none">&gt; <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"><br clear="none">
[one two three( is not a list.<br clear="none">[list one two three( is a list.<br clear="none">So what you get is *maybe* the normal behavior ?<br clear="none">But, yep, what did you expect ?<br clear="none">++<br clear="none">
<br clear="none">Jack<div><br clear="none"><br clear="none"><br clear="none"><br clear="none">_______________________________________________<br clear="none"><a shape="rect" href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br clear="none">
UNSUBSCRIBE and account-management -&gt; <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a></div><br><br></div>  </div> </div>  </div> </div>
</div><br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>