<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">In your quote of Miller's help patch you left off half the sentence. Here's the <br>full quote:<br><br>"Route checks the first element of a message against each of<br>its arguments, which may be numbers or symbols (but not a<br>mixture of the two.)"*<br><br>The part before the comma is wrong-- that's not how [route] works. The reality is:<br>1) If the first arg is a symbol atom, then [route] is put in "selector" mode and checks <br>the selector against its arguments. Subsequent args are assumed to be symbol atoms <br>(and if you try to use a float as a subsequent arg it will be treated as an empty symbol).<br>2) If the first arg is a float, then [route] is put in "list" mode and checks the first element <br>of an incoming list against its arguments. Subsequent args are assumed to be floats <br>(and if you try to use a symbol it will be
treated as the value "0").<br><br>So what you quoted is the answer, as long as the questioner magically realizes to <br>ignore everything before the comma.<br><br>* The parenthesis should be inside the period.<br><br>-Jonathan<br><br>--- On <b>Sun, 2/27/11, Pedro Lopes <i><pedro.lopes@ist.utl.pt></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Pedro Lopes <pedro.lopes@ist.utl.pt><br>Subject: Re: [PD] unexpected behaviour in [route]<br>To: "Jack" <jack@rybn.org><br>Cc: pd-list@iem.at, "rene beekman" <r@raakvlak.net><br>Date: Sunday, February 27, 2011, 11:49 PM<br><br><div id="yiv1861737781"><div>The first paragraph of route-help states:</div><div><br></div><div>"which maybe numbers or symbols (but not a mixture of the two unless the datatypes are defined explicitly)"</div><div><br></div><div>Its the answer.</div>
<div>See the help patch.<br><br><div class="yiv1861737781gmail_quote">On Sun, Feb 27, 2011 at 10:40 PM, Jack <span dir="ltr"><<a rel="nofollow" ymailto="mailto:jack@rybn.org" target="_blank" href="/mc/compose?to=jack@rybn.org">jack@rybn.org</a>></span> wrote:<br><blockquote class="yiv1861737781gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is not a bug.<br>
Just do something like this to avoid any problem :<br>
<br>
[route number number number ...]/[route word word word ...]<br>
++<br>
<br>
Jack<br>
<br>
<br>
<br>
Le dimanche 27 février 2011 à 22:46 +0200, rene beekman a écrit :<br>
<div><div></div><div class="yiv1861737781h5">> I'm preparing some patches for courses that I teach and I noticed<br>
> behaviour in [route] that I found unexpected or at least inconsistent.<br>
><br>
><br>
> Attached is a patch that demonstrates the problem.<br>
><br>
><br>
> In short: when mixing types of arguments for [route], the object will<br>
> fail to properly route a float if the float is preceded by a symbol<br>
> argument.<br>
> For example:<br>
> [route 12 nobug] will route 12 properly<br>
> [route bug 12] will send any incoming 12 to its last ('undefined')<br>
> output<br>
><br>
><br>
> This is with Pd Extended 0.42.5 on Mac OS 10.6.6<br>
><br>
><br>
> Is this a bug or am I overlooking something?<br>
><br>
><br>
> Rene<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> <a rel="nofollow" ymailto="mailto:Pd-list@iem.at" target="_blank" href="/mc/compose?to=Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a rel="nofollow" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>_______________________________________________<br>
<a rel="nofollow" ymailto="mailto:Pd-list@iem.at" target="_blank" href="/mc/compose?to=Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a rel="nofollow" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Pedro Lopes (MSc)<br>contact: <a rel="nofollow" ymailto="mailto:pedro.lopes@ist.utl.pt" target="_blank" href="/mc/compose?to=pedro.lopes@ist.utl.pt">pedro.lopes@ist.utl.pt</a><br>website: <a rel="nofollow" target="_blank" href="http://web.ist.utl.pt/Pedro.Lopes">http://web.ist.utl.pt/Pedro.Lopes</a> / <a rel="nofollow" target="_blank" href="http://pedrolopesresearch.wordpress.com/">http://pedrolopesresearch.wordpress.com/</a> | <a rel="nofollow" target="_blank" href="http://twitter.com/plopesresearch">http://twitter.com/plopesresearch</a><br>
</div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br><a ymailto="mailto:Pd-list@iem.at" href="/mc/compose?to=Pd-list@iem.at">Pd-list@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></div></blockquote></td></tr></table><br>