String delimiters [WAS Re: common code patterns]

Richard Gaskin ambassador at fourthworld.com
Mon Aug 14 13:49:44 EDT 2017


Bob Hall wrote:

 >> On Aug 14, 2017, at 6:28 AM, Alex Tweedly wrote:
 >>
 >> While we (i.e. you) are thinking about string delimiters, could we
 >> PLEASE have some decent way to do multi-line strings.
 >
 > I find myself in many situations where multi-line strings would make
 > my code so much more readable. I do a lot of database work and having
 > a multi-line string for defining queries would be great.
 >
 > I used to put my queries in custom props (easier to read/modify) but
 > I’m finding now that I’d rather have the definitions in script-only
 > stacks and get them under source control. However, the current method
 > of appending multi-line strings together makes the code difficult to
 > work with and read.
 >
 > So I’ll +1 this request. I’d lean toward the triple-quote syntax for
 > implementation.

A while back I proposed some form of bash's heredoc - I'm not enamored 
of the name, but the concept seems useful:

http://quality.livecode.com/show_bug.cgi?id=17471

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the Use-livecode mailing list