Page 1 of 1

Using " inside a string.

Posted: Sun Dec 16, 2018 5:50 am
by Googie85
Hi Guys!

I am having trouble trying to put a " inside a string. Any help?

Many Thanks,

Googie.

Re: Using " inside a string.

Posted: Sun Dec 16, 2018 9:57 am
by bn
Hi Google,

use the keyword quote.
put this into the message box and hit return

Code: Select all

put "first word " & quote & " second word " & quote
or Klaus has a nifty function for this I think he calls it kwote.

Code: Select all

on mouseUp
   put kwote("first word") && "and" && kwote("second word") 
end mouseUp

function kwote pWhatToQuote
   return quote & pWhatToQuote & quote
end kwote


Kind regards
Bernd

Re: Using " inside a string.

Posted: Sun Dec 16, 2018 1:13 pm
by bogs
Klaus, that looks adorable!

Re: Using " inside a string.

Posted: Sun Dec 16, 2018 3:53 pm
by Klaus
I call my li'l functions "q" (quotes) and "q2" (single quotes), but the name "kwote" definitively bears Richmonds signature! :D

Re: Using " inside a string.

Posted: Sun Dec 16, 2018 3:59 pm
by bogs
Well, loving cuteness in code as I do, to whomever was the author, that ranks right up in the top 10 cutesies I have seen this year, and you can kwote me on that :P