[bug #68529] A if ... elseif syntax error not flagged.

"Dmitri A. Sergatskov" <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #7, bug #68529 (group octave):

I tried:

octave:7> ver
----------------------------------------------------------------------
GNU Octave Version: 9.1.1 (hg id: 35ac89ffcf7c)
GNU Octave License: GNU General Public License
Operating System: Linux 7.1.6-201.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug
4 00:23:39 UTC 2026 x86_64
----------------------------------------------------------------------
no packages installed.
octave:8> a=1;
if
  a==1;
  a=2;
end
error: parse error:

  syntax error

>>> if
      ^
error: parse error:

  syntax error

>>> end
      ^
octave:11> a=1; clear b;  if  a==1, elseif, b=1, end; 
warning: suggest parenthesis around assignment used as truth value
octave:12> 


In any case I think I have a fix. I need to do a few more tests.

Dmitri.
-- 



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68529>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCanM3/QAKCRCqLAuaBUf3
TgLYAP4/3Fy0V6RO4CEUK5AunTvbHlRt7cO5lexqc1P7j8DDQQD9FP9NYKgYLjd2
hNYNLmRqzmKL93N41NV0vDH9rsuYKQQ=
=3qj7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.