Here&#39;s a possibility.&nbsp; Not very elegant, but it works.<br>Replace the list and the numberboxes with whatever input and output you need and it ought to work, if the differences are smaller than 100000.<br>-Chuckk<br><br>
<div><span class="gmail_quote">On 6/18/07, <b class="gmail_sendername">danja</b> &lt;<a href="mailto:binary.koala@gmail.com">binary.koala@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello there,<br>i have a [list] of numbers and i&#39;d like to search through it for the<br>value closest to the search subject. so to say, if i have &#39;22 31 47 86&#39;<br>in my list and i match it with &#39;45&#39; the answer would be &#39;47&#39; (closest in
<br>the list). this rather useful function (fuzzy integer search?) must have<br>been written by someone already, it&#39;s just that i can&#39;t find it :)<br>i wouldn&#39;t ask if i could patch it myself, but i know how it might work:
<br>all integers from the list are compared to the reference (subject)<br>number, and the integer in subtraction closest to &#39;0&#39; would be the<br>hit... you know what i mean?<br><br>any advice is very much appreciated!
<br><br>p.s. apologies for my ignorance, i&#39;m just starting here...<br><br>--<br>danja<br><a href="http://k0a1a.net">http://k0a1a.net</a><br><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">http://lists.puredata.info/listinfo/pd-list</a><br></blockquote></div><br><br clear="all"><br>
-- <br><a href="http://www.badmuthahubbard.com">http://www.badmuthahubbard.com</a>