How to put comma's and fullstops in a comment?

May 15, 2013 at 2:04am

How to put comma's and fullstops in a comment?

So basically i have a series of messages, each with a ‘set’ at the beginning and text afterwards.  When a bang hits the message i wish for it to go to a comment and write out a story. But when i do so, max wont allow the comma’s or full stops to go to the comment.

 

any help?

#249365
May 15, 2013 at 2:24am

There is no problem with commas in comment boxes; the problem is that the comma has a special meaning in the message box you’re banging. This is explained in the early tutorials about message boxes.

You can probably work around this by “escaping” the comma in the message box (preceding it with a backslash character).

Periods (full stops) should not be a problem. Can you describe more specifically what your problem with periods is, preferably with a small patch?

#249369
May 15, 2013 at 3:58am

would there be a better thing to use other than a message?

 

#249377
May 15, 2013 at 4:44am

Message box is fine; you need to adjust to Max’ requirements for escaping commas.

There are alternatives involving, for instance, [sprintf] or other text-mangling objects. But the message box is probably more direct and should be just fine. Without a concrete patch, I cannot offer more than that.

Even more important than the special handling of commas and semicolons is understanding that Max does not have “text,” per se. It has symbols. There is a difference. It takes a while for the significance of the distinction to seep in, but it is significant. Be patient with Max and yourself while getting used to it.

#249381
May 15, 2013 at 4:47am

indeed usually the message box is awesome, if you have problem wiht some characters in your message you could also use the quote marks : ” your message here ”

it will transform message into a single symbol. That or the backslash as Peter Castine explained, depending on the context, which truly we could help you about more if you shared a bit of your patch.

#249382
May 15, 2013 at 5:23am

thanks for all the help guys, just figured out my problem, there is a pretty big learning curve with max, but hopefully ill get there.

#249387
May 15, 2013 at 6:09am

the alternatives are trigger, list, or coll.

#249395
May 16, 2013 at 3:14am

With all respect due to Roman , [trigger] and [coll] won’t help much with comma problems. You’ll still need to escape any special punctuation (lessee, that includes comma, semicolon, dollar, the backslash itself, and probably the hash mark) you inadvisedly want to use in your symbols.

For a long and happy life, your best bet is to avoid those characters in Max, reserving them for the special uses Miller Puckette intended for them. If you insist on using those characters, then you’ll have to learn to escape them (and, if your symbols will be parsed multiple times in the course of your Max dataflow, then you need to multiple-escape the little buggers).

One possible alternative is to [atoi] all the characters in your text stream and then [itoa] or [sprintf] them just before passing them into an object that treats symbols more like unparsed text (i.e., [textedit], [comment], etc.) But there will probably still be tricky situations.

#249515
May 16, 2013 at 5:42am

oh he wants to keep the commas, i thought the other way round.

#249524

You must be logged in to reply to this topic.