Using " inside a string.

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Using " inside a string.

Post by Googie85 » Sun Dec 16, 2018 5:50 am

Hi Guys!

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

Many Thanks,

Googie.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3999
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Using " inside a string.

Post by bn » Sun Dec 16, 2018 9:57 am

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

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using " inside a string.

Post by bogs » Sun Dec 16, 2018 1:13 pm

Klaus, that looks adorable!
Image

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Using " inside a string.

Post by Klaus » Sun Dec 16, 2018 3:53 pm

I call my li'l functions "q" (quotes) and "q2" (single quotes), but the name "kwote" definitively bears Richmonds signature! :D

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using " inside a string.

Post by bogs » Sun Dec 16, 2018 3:59 pm

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
Image

Post Reply

Return to “Windows”