On 31.10.2016 20:48, Rick McGuire wrote:
> Well, there's always { and }, which never gets used because we're constantly 
> saving them for
> something in the future. 
>
> Rick
+1

> On Mon, Oct 31, 2016 at 3:16 PM, Mike Cowlishaw <m...@speleotrove.com 
> <mailto:m...@speleotrove.com>>
> wrote:
>
>
>      
>
>             Using /' ... '/ or /" ... "/ for multiline literals
>
>
>         This is not an option, as e. g. say 2 /" 3 "/ 4 is already a valid 
> expression
>          
>
>     Indeed; I was definitely not suggesting a specific syntax, just trying to 
> indicate the concept.
>      
>     Mike 
>

Using {, } instead of /", /', '/, "/ in the examples of my last post even would 
improve legibility
even more:

    This also makes it easier to use (unescaped) single and double quotes as 
many times as one sees
    fit within a string literal, e.g.

        str= { this is a multiline literal using a "double", a ""double 
double"", a 'single' or
        \n\ta double ''single'' quotes without a problem } str= { this is a 
multiline literal using
        a "double", a ""double double"", a 'single' or \n\ta double ''single'' 
quotes without a
        problem }

    Additionally, it becomes possible to have block and line comments unescaped 
in such a multi-line
    literal, e.g.

        say { this is a multiline literal that allows one to use 'single' or 
"double" quotes within
        the same string as well as /* comment-like */ text as well as -- double 
dashes. \n\tthis was
        a newline char followed by a tab char }

    So for example a SQL-statement could be changed from currently (almost 
illegible, example
    extracted from a post to RexxLA):

        sql_cmd = "INSERT INTO wp_posts
        (","'ID',","'post_author',", "'post_date',", "'post_date_gmt',", 
"'post_content',", "'post_title',","'post_excerpt',", "'post_status',", 
"'comment_status',", "'ping_status',", "'post_password',", "'post_name',", 
"'to_ping',", "'pinged',", "'post_modified',", "'post_modified_gmt',", 
"'post_content_filtered',", "'post_parent',","'guid',", "'menu_order',", 
"'post_type',", "'post_mime_type',", 
"'comment_count')","VALUES(","'"gp.ID.1"',","'"gp.post_author.1"',","'"gp.post_date.1"',","'"gp.post_date_gmt.1"',","'"gp.post_content.1"',","'"gp.post_title.1"',","'"gp.post_excerpt.1"',","'"gp.post_status.1"',","'"gp.comment_status.1"',","'"gp.ping_status.1"',","'"gp.post_password.1"',","'"gp.post_name.1"',","'"gp.to_ping.1"',","'"gp.pinged.1"',","'"gp.post_modified.1"',","'"gp.post_modified_gmt.1"',","'"gp.post_content_filtered.1"',","'"gp.post_parent.1"',","'"gp.guid.1"',","'"gp.menu_order.1"',","'"gp.post_type.1"',","'"gp.post_mime_type.1"',","'"gp.comment_count.1"'",")"

        to a better legible (less error prone) version:

        sql_cmd = { INSERT INTO wp_posts ('ID', 'post_author', 'post_date', 
'post_date_gmt',
        'post_content','post_title', 'post_excerpt', 'post_status', 
'comment_status','ping_status',
        'post_password', 'post_name', 'to_ping','pinged', 'post_modified',
        'post_modified_gmt','post_content_filtered', 'post_parent', 
'guid','menu_order','post_type',
        'post_mime_type', 'comment_count' )VALUES('}gp.ID.1{', 
'}gp.post_author.1{',
        '}gp.post_date.1{', '}gp.post_date_gmt.1{','}gp.post_content.1{', 
'}gp.post_title.1{',
        '}gp.post_excerpt.1{','}gp.post_status.1{','}gp.comment_status.1{',
        '}gp.ping_status.1{','}gp.post_password.1{',
        
'}gp.post_name.1{','}gp.to_ping.1{','}gp.pinged.1{','}gp.post_modified.1{','}gp.post_modified_gmt.1{','}gp.post_content_filtered.1{','}gp.post_parent.1{','}gp.guid.1{','}gp.menu_order.1{','}gp.post_type.1{','}gp.post_mime_type.1{','}gp.comment_count.1{')
        }


---rony

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to