functionend ignored

John W. Eaton jwe at octave.org
Fri Jul 17 11:39:20 CDT 2009


On 17-Jul-2009, Sergei Steshenko wrote:

| I mean that missing 'end'/'enfunction' should not just cause a warning, but
| be considered an error. It is really easy to add missing 'endfunction'.

If Matlab can handle the code without warnings and Octave gives an
error, people will complain, or just think that Octave sucks.  They
won't want to change the code, which might not even be theirs.  So I
think that handling

  function foo ()
    ...
  function bar ()
    ...
  EOF

as valid is necessary.  Especially since I think this was originally
the only way to write subfunctions in Matlab, so there is likely to
still be a lot of code that uses this form.

jwe


More information about the Bug-octave mailing list