parentheses within string break value()

Dr. Hawkins dochawk at
Sat Oct 24 20:46:38 EDT 2015

I am finding that parentheses within strings break value()

put  value ("Abc" & 45 & "123(def)")


Script compile error:

Error description: local: not a valid variable or constant name

If I escape it as

put  value ("Abc" & 45 & "123\(def\)")

it produces


I don't think that either of these is correct, or am I missing something?

I am trying to assemble strings which have variable names using custom
properties for using in database queries, such as

"SELECT foo FROM " & tableName & " WHERE bar > 7;"

and in my learned paranoia, I want to wrap each condition with parentheses
when I have more than one (I got tired of remembering precedence rules for
each language, and which ones are screwy, and . . .)

Dr. Richard E. Hawkins, Esq.
(702) 508-8462

More information about the use-livecode mailing list