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: Ulrich Neumerkel
Subject: Re: multilines strings "a la python"
Date: Sat, 31 Jan 2015 19:48:47 +0100

((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. /*
"""*/

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.



reply via email to

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