changeset 31064:505ec2f4e16f stable

NEWS.7.md: Reword note about whitespaces around operators (bug #62552).
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 03 Jun 2022 08:52:53 +0200
parents 20aa91d357be
children d33af4594440
files etc/NEWS.7.md
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS.7.md	Thu Jun 02 14:30:06 2022 -0400
+++ b/etc/NEWS.7.md	Fri Jun 03 08:52:53 2022 +0200
@@ -47,7 +47,7 @@
 
 ### Documentation
 
-- Fix minor typo in datestr.m.
+- `datestr.m`: Fix minor typo.
 - `ls.m`: Improve wording in docstring (bug #62282).
 - `dir.m`: Clarify wildcard behavior on Windows in docstring (bug #62282).
 - `memory.m`: Redo documentation to be formatted correctly in Info output.
@@ -148,17 +148,19 @@
 between these operators and the variable they affect were allowed.  That
 is no longer the case.
 
-- For compatibility with command syntax, inplace operators (`+=`, `-=`,
-`*=`, `.*=`, `/=`, `./=`, `\=`, `.\=`, `^=`, `.^=`, `|=`, `&=`) must now
-either be followed by a whitespace character or must not be preceded by a
-whitespace character.  For commands with binary operators (`+`, `-`, `*`,
- `.*`, `/`, `./`, `\`, `.\`, `^`, `.^`, `|`, `&`, `||`, `&&`) without
-assignment, the same rules apply.  That was not a requirement in previous
-versions of Octave.
-E.g., `a + b`, `a+ b`, or `a+b` are valid if `a` is a variable.  In
-contrast, `a +b` will throw an error if `a` is a variable.  The latter
-example is now interpreted as command syntax expression equivalent to the
-function syntax expression `a ("+b")`.
+- When an expression involving operators could be interpreted ambiguously
+either as command style syntax or function style syntax, it is
+interpreted as command style syntax in more cases than in previous
+versions.  To still be interpreted as function style syntax, inplace
+operators (`+=`, `-=`, `*=`, `.*=`, `/=`, `./=`, `\=`, `.\=`, `^=`,
+`.^=`, `|=`, `&=`) must now either be followed by a whitespace character
+or must not be preceded by a whitespace character.  For ambiguous
+expressions involving binary operators (`+`, `-`, `*`, `.*`, `/`, `./`,
+`\`, `.\`, `^`, `.^`, `|`, `&`, `||`, `&&`), the same rules apply.
+E.g., `a + b`, `a+ b`, or `a+b` are valid expressions if `a` is a
+variable.  In contrast, `a +b` will throw an error if `a` is a variable.
+The latter example is now interpreted as a command syntax expression
+(equivalent to the function syntax expression `a ("+b")`).
 
 - The `mldivide` function (i.e., the `\` operator) now uses an LU
 decomposition to solve nearly singular full square matrices.  This is