[PD] numeric order

Frank Barknecht fbar at footils.org
Mon Jun 20 09:18:50 CEST 2011


On Sun, Jun 19, 2011 at 07:20:02PM +0200, Mirko Maier wrote:
> i have textfile like
> 1 this;
> 4 my;
> 3 is;
> 10 file;
> and i would like to put it into numerical order, so that the final result is
> 1 this;
> 3 is;
> 4 my;
> 10 list;
> the only possibility i found was a recursive use of "minmax", but i have huge
> lists and then it is very cpu-expensive. is there any object for numerical
> ordering or something shorter than using "minmax"? thanks for hints.

Another answer: You can also avoid the unnecessary (for your task) complex
[m_symbolarray] if you use data structures directly as in the attached
example. Unfortunatly creating scalars with symbol-fields is not directly
possible with [append] - at least not in 0.42 - so I had to do the additional
work of using [set -symbol ...]

 Frank Barknecht            Do You RjDj.me?          _ ______footils.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sort-pair.pd
Type: application/puredata
Size: 2076 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110620/4a67039b/attachment.bin>

More information about the Pd-list mailing list