Page 1 of 1

old syntax "q"

Posted: Wed Nov 06, 2013 11:53 am
by Nakia
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

Re: old syntax "q"

Posted: Wed Nov 06, 2013 2:33 pm
by Klaus
Hi Nakia,

yep, "quote" is correct :D

Code: Select all

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

Klaus

Re: old syntax "q"

Posted: Wed Nov 06, 2013 10:14 pm
by Nakia
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?

Re: old syntax "q"

Posted: Wed Nov 06, 2013 11:27 pm
by jacque
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."