[PD] symbol2list leading zero

Mathieu Bouchard matju at artengine.ca
Fri Nov 4 17:54:56 CET 2011


Le 2011-11-04 à 17:44:00, rolf meesters a écrit :

> 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.

Two solutions, a long one using [gf/l2s] and [gf/s2l] (which Roman calls 
« not practical »), and a shorter one using [gf/string_replace].

#N canvas 0 0 450 184 10;
#X msg 6 -2 symbol 00-11-ab-7d-85-04;
#X obj 6 18 gf/s2l -;
#X obj 6 38 gf/l2s;
#X msg 61 38 symbol;
#X obj 61 18 loadbang;
#X obj 6 58 print;
#X msg 6 88 symbol 00-11-ab-7d-85-04;
#X obj 6 108 gf/string_replace -;
#X obj 6 128 print;
#X text 107 38 symbol message without symbol means empty string;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 3 0 2 1;
#X connect 4 0 3 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;

  ______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC


More information about the Pd-list mailing list