On 01/23/2014 07:43 PM, Peter P. wrote:
> Hi,
> 
> this might be totally simple, but I am wondering what is the most
> elegant way of creating a list out of individual messages
> 
> 12
> 23
> 34
> 45
> 
> meaning a list which holds four items, and which is always created at
> the number '12', and sent out at the nu,ner '45', yielding:
> 
> list 12 23 34 45
> 
> so some kind of parallelization depending on a header value (12).
> 

i found [list prepend] to be the easiest accumulator to read (though
performance-wise it's less optimal once it comes to **large** lists)

adding the logic to convert your starting and stopping delimiters to
reset/output the list, is left as an exercise for the user.

fgmadrs
IOhannes

#N canvas 459 190 604 364 10;
#X msg 230 92 12 \, 23 \, 34 \, 45;
#X obj 149 209 list prepend;
#X obj 230 161 list prepend;
#X obj 230 183 t a a;
#X obj 149 231 print;
#X obj 311 136 t b b;
#X msg 57 86 bang;
#X obj 57 108 t b b;
#X text 226 66 data to accumulate;
#X text 44 64 output and reset;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 1 1;
#X connect 3 1 2 1;
#X connect 5 0 2 1;
#X connect 5 1 1 1;
#X connect 6 0 7 0;
#X connect 7 0 5 0;
#X connect 7 1 1 0;

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to