Hi Guys!
I am trying to put a " into a variable. For example:
put " "test" " into tVar
Any advice will be greatly received!
Thanks,
Googie.
How to put a " into a variable.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: How to put a " into a variable.
Code: Select all
put quote & "test" & quote into tvar
Re: How to put a " into a variable.
Thanks for your reply!
It worked! Although I have another similar question. I have the following string:
"Test String"
I need to remove the " and leave the remaining text only.
Many Thanks for any assistance.
Googie.
It worked! Although I have another similar question. I have the following string:
"Test String"
I need to remove the " and leave the remaining text only.
Many Thanks for any assistance.
Googie.
Re: How to put a " into a variable.
Use replace or replaceText commands.Googie85 wrote: Fri Jan 05, 2024 6:30 am Thanks for your reply!
It worked! Although I have another similar question. I have the following string:
"Test String"
I need to remove the " and leave the remaining text only.
Many Thanks for any assistance.
Googie.
Look it up in LiveCode's Dictionary or use Google (i.e. search for 'livecode replace command' or some such)
The dictionary should suffice and should always be the first port of call. But it sounds like you may not have tried this...
Re: How to put a " into a variable.
What everyone said.
The issue is that "quote"
is both a character (") that defines text AND a constant ("quote", ASCII 34)
. So in order to be able to add the quote character to a string one must use the constant.
It is easier to understand and use, say, the "return" constant (ASCII 10) when building a multi-line string. One does not hit the return key to do so. But the employment of each is identical.
Craig
The issue is that "quote"
It is easier to understand and use, say, the "return" constant (ASCII 10) when building a multi-line string. One does not hit the return key to do so. But the employment of each is identical.
Craig
Re: How to put a " into a variable.
You can also use trueWord:Googie85 wrote: Fri Jan 05, 2024 6:30 am Although I have another similar question. I have the following string:
"Test String"
I need to remove the " and leave the remaining text only
Code: Select all
put trueword 1 to -1 of tString into tStringJacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to put a " into a variable.
Learn something every day 
