Forums > MaxMSP

how to exclude symbol from a list ?


FP
July 24, 2008 | 3:06 am

hi,
all is in the question.

how to do

coco 12 34 56 -> 12 34 56

thx.
f./


July 24, 2008 | 3:26 am

Assuming you’re after a generic solution, whereby the symbol might be anything, could occur at any position in the list, there could be more than one symbol, and the list could also include integers and/or floats:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 44 104 22 196617 b 1;
#P newex 72 193 32 196617 print;
#P newex 72 129 73 196617 route int float;
#P newex 72 163 46 196617 zl group;
#P message 72 60 75 196617 coco 12 34 56;
#P newex 72 103 47 196617 zl iter 1;
#P connect 1 0 5 0;
#P connect 1 0 0 0;
#P connect 0 0 3 0;
#P connect 5 0 2 0;
#P connect 2 0 4 0;
#P connect 3 1 2 0;
#P connect 3 0 2 0;
#P window clipboard copycount 6;


July 24, 2008 | 4:32 am

On Jul 23, 2008, at 8:06 PM, fp wrote:

> coco 12 34 56 -> 12 34 56

"zl slice" or "zl ecils"

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 125 188 95 196617 12 34 56;
#P newex 125 163 62 196617 prepend set;
#P newex 84 134 51 196617 zl slice 1;
#P message 84 110 75 196617 coco 12 34 56;
#P comment 138 137 91 196617 remove first item;
#P connect 1 0 2 0;
#P connect 2 1 3 0;
#P connect 3 0 4 0;
#P window clipboard copycount 5;

-C

Chris Muir
cbm@well.com

http://www.xfade.com


July 24, 2008 | 7:57 am

I would do [route coco].
J-F.

> how to do
>
> coco 12 34 56 -> 12 34 56



FP
July 24, 2008 | 10:08 am

thx. the first solution is what i need.
’cause the symbol is not always at the same place and i have to detect when there’s a symbol too.
but yes i know zl slice. :-) it was noty so simple but i didn’t say it. sorry.


Viewing 5 posts - 1 through 5 (of 5 total)