Sprintf %s %s %s

Oct 31, 2009 at 4:03pm

Sprintf %s %s %s


I hope someone knows an easy solution for this…

I want to combine a lot of information in one coll index.
But, when I use sprintf, there are no quotes around the symbols.
I need these quotes because one symbol can be one or more words.

And example is attached.

Kind regards,

Oct 31, 2009 at 4:27pm

– Pasted Max Patch, click to expand. –

i imagine there is a more elegant way

Oct 31, 2009 at 4:33pm

Hello Mike,

Thanks for your quick reply.
It works great, but the problem is that the information (like 8 numbers, words and lines) has to be in a specific order. It is collected in a different order from an user interface.

So unfortunately I can’t make it work with ‘zl join’.
The nice thing of sprintf is that I can collect all the info and the bang it through when inputting the index for the coll.

Kind regards,

Oct 31, 2009 at 4:44pm

How about [mxj list.Queue]?


– Pasted Max Patch, click to expand. –
Oct 31, 2009 at 6:59pm

Try putting the “quote” marks in the [sprintf] object, you’ll need to escape them with the backslash character:

[sprintf "%s" "%s" "%s"]


Oct 31, 2009 at 7:01pm

i thought there was a way with sprintf!

Nov 2, 2009 at 10:45pm

there is another way as well:
[sprintf symout %s %s %s]

this only works for single symbol output, though.


Nov 2, 2009 at 11:45pm

Thanks for all you replies!

This way works best for me “%s”, since the order in which I put the information in is not ‘from right to left’.
Although I realised it might be possible with ‘pack’ as well.

Kind regards,


You must be logged in to reply to this topic.