octave-maintainers
[Top][All Lists]
Advanced

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

Re: Continuation lines


From: Jordi Gutiérrez Hermoso
Subject: Re: Continuation lines
Date: Wed, 3 Apr 2013 11:04:41 -0400

On 3 April 2013 10:32, John W. Eaton <address@hidden> wrote:
> Hmm, inside [] or {}, parens should work as usual.  So
>
>   [(1
>    + 2)]
>
> should produce 3.  That should work in both the old and the new
> parser/lexer.  Or maybe you are thinking of some other case?

Yes, I was thinking of this case:

   [1, 2\
    3, 4]

You can't really replace that backslash with anything but the
ellipses.

> If we keep the \ continuations, what about deprecating comments and
> whitespace between the \ and \n and eventually requiring that the
> backslash is followed immediately by a newline character and nothing
> else?

Why, because of the left division ambiguity? If that's the reason, I
still don't think this ambiguity has ever caused problems. If the
reason is so that \ behaves exactly like ..., then I can agree, but
I'm happy with the slight discrepancy here, as long as you don't see
other problems with it.

> But either way, I think we should make ... work as in Matlab, which
> means allowing arbitrary text to follow it but not allowing it as a
> continuation marker inside character strings.  I guess we can start
> there.

Agreed.

- Jordi G. H.


reply via email to

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