help-octave
[Top][All Lists]
Advanced

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

Re: continuation?


From: Jordi Gutiérrez Hermoso
Subject: Re: continuation?
Date: Wed, 12 Feb 2014 15:32:21 -0500

On Wed, 2014-02-12 at 19:21 +0000, fork wrote:
> I would add a warning when the backslash is encountered, but keep it
> in the language indefinitely, just in case any maintainers are
> listening.

The problem is that it's also used as a left division operator. While
the Matlab language doesn't use # for anything, the \ operator as a
continuation marker makes the parser more complicated. Consider,

    x = (5\ 
         10);

which is a parsing error, but

    x = (10/
         5);

which parses fine.

However, as this example illustrates, you can get by without
continuation markers altogether in many cases, something that is only
allowed in Octave but not in Matlab. If there are open round brackets,
Octave will ignore newlines.

- Jordi G. H.





reply via email to

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