Re: multilines strings "a la python"

"Jose F. Morales" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <CAEdsdLdd_xQqRVPMYxbns4krOen7+_px7kH322ci0d2WGG9Axg@mail.gmail.com>
On Sun, Feb 1, 2015 at 11:38 PM, Ulrich Neumerkel <
[email protected]> wrote:

> Algaba:
> >> I add such text in Emacs with C-x r t \n\ Return
> >> So spaces are added in lines that happen to be shorter.
> >Yes, I do create a macro that adds \n\ to the end of the line and then I
> >execute it n-times. But it's not nearly as easy as in
> >python.
>
> Putting \n\ directly at the end makes rather unreadable code.  But at
> a fixed column position it is much better readable.  Look at the
> following with a fixed-width font!
>
> main_prog -->
>     disclaimer,
>     "                          \n\
> main()                         \n\
>    {  int i;                   \n\
>       i = 3;                   \n\
>       if (i > 2)               \n\
>         whatever();            \n\
>       exit(0);                 \n\
>    }                           \n\
>     ",
>    footer.
>

Unfortunately that text contains extra spaces which are not removed so that
is not a solution in general. Would ISO allow using `...` as multiline
string delimiter?

-- 
Jose

_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.