octave-3.0.3 accepts 'function' without 'endfucntion' (or with redundant 'endfunction')

Sergei Steshenko sergstesh at yahoo.com
Fri Jul 10 10:42:20 CDT 2009


Hello,

lately I've been dealing a lot with optim-1.0.4/leasqr.m.

Looking into its source I came to the conclusion that 'endfunction' (or the
corresponding 'end') is missing. To be honest, I didn't check it very
thoroughly.

Still, I simply added 'endfunction' and recompiled (even quitting/restarting 'octave') - the compilation went smooth (no warnings)
and the function works as before.

Now, if the function indeed has missing 'endfunction'/'end', then my 
addition of it indicates that 'octave' parser accepts it, which I think it shouldn't.

If 'end' is not missing, then 'octave' parser accepts redundant
'endfunction', which I think it shouldn't either.

Please note 'leasqr.m' is written in a strange'ish manner - lot of 
semicolons and colons I wouldn't put.

Thanks,
  Sergei.


      


More information about the Bug-octave mailing list