users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multilines strings "a la python"


From: Algaba
Subject: Re: multilines strings "a la python"
Date: Sun, 01 Feb 2015 21:11:16 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0


El 31/01/15 19:48, Ulrich Neumerkel escribió:
((I am not sure that this will receive all recipients))

Jose F. Morales:
Other Prolog systems support multiline strings also with "..." syntax. Does
anyone remember if that is incompatible with ISO Prolog standard? If not,
is there any reasonable syntax extension that can be adopted by other
Prolog implementations too?

(I've included Ulrich Neumerkel in the discussion)

On Sat, Jan 31, 2015 at 12:35 PM, Algaba <address@hidden> wrote:

hello

  Desperately,  I need multilines strings "a la python", something like :

  a_predicate(""" this is a multiline
This cannot be conforming Prolog syntax, that is, it cannot be a
syntax extension (5.5.1) as it interferes with valid Prolog syntax.
The minimal counterexample is probably:

:- set_prolog_flag(double_quotes,atom).

"""+"b. /*
"""*/

I haven't used such example in my life, and probably I won't . If triple double quotes is a problem, any other combination ( ''', !!!, {{{) would be fine as well.

which corresponds to

+('',b).

With this extension, valid Prolog text would be interpreted
differently.

  Putting \n\ at the end of each line is a huge nuisance in copy/paste
operations
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.

greetings
...
algaba



reply via email to

[Prev in Thread] Current Thread [Next in Thread]