Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11343

Compiling multi-line strings into resource / executable with purity

Newsgroups comp.lang.clipper.visual-objects
Date 2018-01-31 01:13 -0800
Message-ID <faea89cd-78fd-49ab-b47f-efd03acdb9bd@googlegroups.com> (permalink)
Subject Compiling multi-line strings into resource / executable with purity
From Robert Pope <cooeee@gmail.com>

Show all headers | View raw


Hi.

I don't think this is possible, but I figured I'd ask anyway..

Are there any tricks around getting a long string compiled into an executable, that is accessible at run time, is visible within the VO IDE (can be globally searched on), and keeps the multi-line text in its pure form (i.e. not wrapped in VO code at a line level. Block level is fine.).

For example, something like the following would be ideal (it doesn't work, though!).

RESOURCE MyTextBlob SQL
BEGIN
   SELECT AAAA FROM BBBB;
   SELECT CCCC FROM DDDD;
   SELECT DDDD FROM EEEE;
   ... (Support for many more lines)
END

I'm trying to avoid wrapping the text with VO code, e.g.:

cSQL := "SELECT AAAA FROM BBBB;"
cSQL += "SELECT CCCC FROM DDDD;"

I'm also trying to come up with a solution that allows global search to work. I.e. if I search for AAAA in global search, the blob will be found.

Currently we either:
 a) wrap our SQL in VO, which isn't great for long scripts and is troublesome when we have to revisit the script.
 b) put the pure SQL in .sql files and RESOURCE them into our application for our long scripts. This makes it easy to read and maintain. The problem is that global search can't see it so we sometimes forget to update them. They are also a pain because the *.sql file and what is encoded into the *.mef frequently lose synchronization, so requires very delicate handling.

We have support for multi line comments with /* */, and multi line TEXTBLOCK which are ignored by the compiler and can't be addressed at run time. I don't suppose there are any tricks for defining multi line strings in a manner like these.

Cheers!

Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Compiling multi-line strings into resource / executable with purity Robert Pope <cooeee@gmail.com> - 2018-01-31 01:13 -0800
  Re: Compiling multi-line strings into resource / executable with purity Robert Pope <cooeee@gmail.com> - 2018-02-20 02:06 -0800
    Re: Compiling multi-line strings into resource / executable with purity dlzc <dlzc1@cox.net> - 2018-02-20 06:07 -0800

csiph-web