This version is out of date, covering development from v8.0.0 to v8.x.x. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v8 Icon

Single and double quotes

When referring to quoting values such as strings, double quotes should be assumed. In edge cases where a string needs to enclose a double quote, for instance a complex command line string, paired single quotes may also be used.

Within quoted text a backslash (\) escapes a character and a double backslash sequence (\\) allows a literal backslash (\) to be used. Besides escaping non-pairing quotes, standard escape codes like \n indicating a new line character or \t for a tab may be used.

However, a backslash cannot be used to escape literal single or double quote characters. This effectively limits the nesting of different types of quotes to one set inside another.

Whilst the mechanism should work for other characters, it is generally only single & double quotes which cause difficulties when used unmatched (or nested) within string literals (including patterns) in Tinderbox. The latter arises as quotes are used as delimiters for inputs and current parsing does not support a quote escape mechanism at initial-parse level. The above method 'hides' the quotes from that initial parse.