Using " inside a string.

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

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

Using " inside a string.

Post by Googie85 »

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: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Using " inside a string.

Post 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
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using " inside a string.

Post by bogs »

Klaus, that looks adorable!
Image
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Using " inside a string.

Post by Klaus »

I call my li'l functions "q" (quotes) and "q2" (single quotes), but the name "kwote" definitively bears Richmonds signature! :D
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using " inside a string.

Post 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
Image
Post Reply