old syntax "q"

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

old syntax "q"

Post by Nakia » Wed Nov 06, 2013 11:53 am

Hi,

I am trying to get an old .rev library up and running and its spewing out a few syntax errors.
It seems there is a "q" character being used a lot and I am wondering if it is old syntax (maybe for 'quote'??) from the runrev days.

Below is an example from the library:

Code: Select all

put "-X =" && q(sCurlPool[pCurl]["method"]) & cr after tConfig

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: old syntax "q"

Post by Klaus » Wed Nov 06, 2013 2:33 pm

Hi Nakia,

yep, "quote" is correct :D

Code: Select all

function q tString
  return QUOTE & tString & QUOTE
end q
Best

Klaus

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: old syntax "q"

Post by Nakia » Wed Nov 06, 2013 10:14 pm

So was this an old 'built in' function that used to exist from the runrev days?

Any advice on how I update the entire stack to deal with this? Maybe just add that function?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7394
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: old syntax "q"

Post by jacque » Wed Nov 06, 2013 11:27 pm

It was never built-in, it's just so commonly used that some authors forget to include the function in their sample scripts. Just add the function to your code, everyone else does. :)

It's a shortcut so you don't have to write things like this:

put quote & "This is a" && tNoun & comma & quote && "he said."
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply