[PD] symbol2list leading zero

rolf meesters rolfmeesters at gmail.com
Fri Nov 4 17:44:02 CET 2011


with trial&error i came up with a quite complicated patch
for the task to convert a MAC addres in the form 00-ab-7d- etc
into it's equivalent without the '-' character.

any comment is welcomed

rolf

#N canvas 104 217 569 343 10;
#X obj -94 16 symbol2list -;
#X obj -75 125 makefilename %.2s;
#X obj -94 45 list-drip;
#X obj -55 103 makefilename %.02d;
#X obj -108 163 symbol;
#X obj -94 74 t b a a;
#X obj -39 164 t l;
#X obj -129 223 list;
#X obj -129 269 list2symbol;
#X obj -108 190 list prepend;
#X msg -66 243 symbol;
#X obj -66 217 loadbang;
#X obj -23 76 s end_drip;
#X obj -185 185 r end_drip;
#X obj -129 304 print;
#X text -22 242 -- get rid of the blanks;
#X msg -94 -12 symbol 00-11-ab-7d-85-04;
#X text 64 98 --makefilename %.2d: in case of a number restores leading
zero \, in case of a symbol gives a zero.;
#X text 23 139 --makefilename %.2s:in case of a number no output \,
in case of a symbol overwrites the unwanted zero.;
#X text 68 -14 --example of the expected input;
#X connect 0 0 2 0;
#X connect 1 0 4 1;
#X connect 2 0 5 0;
#X connect 2 1 12 0;
#X connect 3 0 4 1;
#X connect 4 0 9 0;
#X connect 5 0 4 0;
#X connect 5 1 1 0;
#X connect 5 2 3 0;
#X connect 6 0 9 1;
#X connect 7 0 8 0;
#X connect 8 0 14 0;
#X connect 9 0 6 0;
#X connect 9 0 7 1;
#X connect 10 0 8 1;
#X connect 11 0 10 0;
#X connect 13 0 7 0;
#X connect 16 0 0 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111104/1ae8c142/attachment.htm>


More information about the Pd-list mailing list