octave-maintainers
[Top][All Lists]
Advanced

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

Re: Changes to lexer invalidate documentation


From: John W. Eaton
Subject: Re: Changes to lexer invalidate documentation
Date: Mon, 13 Apr 2009 22:27:48 -0500

On 13-Apr-2009, Rik wrote:

| But they are the only separator for which I was proposing a change.  All
| of my thinking derives from the example in the documentation and I
| wouldn't change the behavior for the comma separator precisely because
| of the difficulty in determining when to begin printing output.

I don't think it would be good to have commands interpreted
differently depending on the type of separator.  There are side
effects other than printing.  For example, I think it would be strange
to have

  function foo ()
    global g;
    g = 1;
  endfunction

  foo (); parse_error+++

result in setting the global variable G to 1 before reporting the
syntax error while

  foo (), parse_error+++

would give an immediate parse error and not call FOO, so not set the
global variable.

Wouldn't that difference be confusing?  Would it be worth it to
introduce an inconsistency like that just to try to get "better" error
reporting?

jwe


reply via email to

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