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

Philip Nienhuis <[email protected]> Thu, 16 Jul 2026 12:45:23 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
--===============1388290784101867981==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

UGxlYXNlIHVzZSB0aGUgYnVnIHRyYWNrZXIgdG8gcG9zdCB1cGRhdGVzIHRvIGEgYnVnIHJlcG9y
dC4gIFRoZSBtYWlsaW5nIGxpc3QgaXMgaW50ZW5kZWQgYXMgYSByZWFkLW9ubHkgbm90aWZpY2F0
aW9uIHN0cmVhbS4gIEluZm8gcG9zdGVkIHRvIHRoaXMgbWFpbGluZyBsaXN0IGFkZHJlc3Mgd29u
J3QgYXBwZWFyIGluIHRoZSB0cmFja2VyIGRhdGFiYXNlIHdoZXJlIGl0IGlzIG1vc3QgdXNlZnVs
LgoK

--===============1388290784101867981==
Content-Type: MULTIPART/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; BOUNDARY="8323329-424238335-1784220323=:1709194"
Content-Disposition: inline

--8323329-424238335-1784220323=:1709194
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #1, bug #68529 (group octave):=0A=0AWhy should it be a sy=
ntax *error*?=0AOctave is a bit more permissive, apparently it assumes anyt=
hing between "if "=0Aand the next comma is a logical expression.  I have no=
 problems with that.=0ARemember that Matlab code should run in Octave, but =
not necessarily the other=0Away round.=0ABut maybe there is a case where it=
 can become ambiguous w/o parens, I'm not=0Asure.=0A=0ABut: =0A* I do agree=
 with you that parentheses might be neater, and=0A* while there, I'd rather=
 have the various statements and clauses on separate=0Alines anyway, as is =
the Octave convention.=0A=0A=0A    ________________________________________=
_______________=0A=0AReply to this item at:=0A=0A  <https://savannah.gnu.or=
g/bugs/?68529>=0A=0A_______________________________________________=0AMessa=
ge sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-424238335-1784220323=:1709194
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCalkKowAKCRCqLAuaBUf3
TnMIAQD/BSeXfUNvUIlmWYBDneDfMR5l9IIRYH/YL6G5Ms5ktAEAkd179he6Ygzs
EJBAK/hTC8ZEQgGZI1xM+tTbWQkjgwc=
=+qmK
-----END PGP SIGNATURE-----

--8323329-424238335-1784220323=:1709194--



--===============1388290784101867981==--