Problem with [tosymbol]

udo's icon

Hi.

Does anyone have experience getting a message including a forward slash ( / ) to output in quotes from a [tosymbol] object? I'm sure there's a simple solution to what I'm doing, but I can't figure it out. In the below patch I'm looking for the end result: "_/16" in a message box.

Thanks in advance for any help!

Max Patch
Copy patch and select New From Clipboard in Max.

-- Udo.

ygreq's icon

hey udo,

What you created is a symbol already. That is why symout doesn't output the quotes. But maybe you already knew that.

And that means what you are asking is: How do you put a symbol into quotes? I checked the forum for "symbol" and "quotes" and there it is: https://cycling74.com/forums/double-quotes-around-symbol-without-spaces

Max Patch
Copy patch and select New From Clipboard in Max.

all the best,
ygreq

udo's icon

Ah, duh! Thanks, ygreg. I should drink coffee before I start a.m. patching!

Happy Saturday!

-- Udo.

udo's icon

I misspelled your name ! Sorry, ygreq.

ygreq's icon

I just edited the above message as the first example here (the second one there in the link) was with space as well.

No problem,
Happy patching to you, too! ;)

udo's icon

Thanks, ygreq.

John Chowning's icon

Hello, YGREQ,
The sprintf solution that you suggested to UDO places a backslash before the double quotes when writing to the left input of a message object. Is there a way to avoid the backslash?
Thanks in advance,
-John

John Chowning's icon

sorry, "...when writing to the right input of a message object."