Hello list,
Mathieu Bouchard a écrit :
So that to do like a msgbox containing "2 3 5 7" you could do:
t_atom t[4]; SETFLOAT(t[0],2); SETFLOAT(t[1],3); SETFLOAT(t[2],5); SETFLOAT(t[3],7); outlet_anything(my_outlet,gensym("list"),sizeof(t)/sizeof(t_atom),t);
In this case "outlet_anything(my_outlet,gensym("list"),4,t); " is better ;-)
but i don't know why outlet_list has a t_symbol *s argument, and i never used it. (I also am using a wrapper, and mine only ever uses outlet_anything)
PS: I just had a look at the source code of Pd and it seems that the s of outlet_list is just ignored, that is, just assumed to be gensym("list"). that's somewhat confusing, but for compatibility, the s argument can't be removed.
The t_symbol *s argument is ignored if it's "gensym("list")" but is bounded to the list if it's different.
t_atom t[4]; SETFLOAT(t[0],2); SETFLOAT(t[1],3); SETFLOAT(t[2],5); SETFLOAT(t[3],7); outlet_anything(my_outlet,gensym("floatList"),4,t);
will output :
floatList 2 3 5 7
on my_outlet. You can then route it as you want without mixing it with other lists ;-).
Bye,
Nicolas