Mercurial > octave
changeset 31674:e3b0fac6acde stable
doc: Clarify text around operator ambiguity (bug #62552)
* doc/interpreter/expr.txi, func.txi: Clarify that potential ambiguity with
binary operators and command syntax is due to user intent not Octave
interpretation.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Mon, 19 Dec 2022 12:00:11 -0500 |
parents | c9430c9cda2e |
children | ed1d3a8bc638 9be3a2706d62 |
files | doc/interpreter/expr.txi doc/interpreter/func.txi |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/expr.txi Mon Dec 19 15:26:48 2022 +0100 +++ b/doc/interpreter/expr.txi Mon Dec 19 12:00:11 2022 -0500 @@ -815,9 +815,9 @@ useful in this case. Note also that some combinations of binary operators and whitespace can -create ambiguities with Octave's Command Syntax form of calling functions. -See @ref{Command Syntax and Function Syntax} for more detail on avoiding -such issues. +create apparent ambiguities with the Command Syntax form of calling +functions. See @ref{Command Syntax and Function Syntax} for a description +of how Octave treats that syntax. @opindex @code{'} @DOCSTRING(ctranspose)
--- a/doc/interpreter/func.txi Mon Dec 19 15:26:48 2022 +0100 +++ b/doc/interpreter/func.txi Mon Dec 19 12:00:11 2022 -0500 @@ -1981,8 +1981,8 @@ returned, the function syntax must be used. It should be noted that mixing command syntax and binary operators can -create ambiguities with mathematical and logical expressions that would use -function syntax. For example, all three of the statements +create apparent ambiguities with mathematical and logical expressions that +use function syntax. For example, all three of the statements @example arg1 - arg2 @@ -1991,10 +1991,10 @@ @end example @noindent -could be interpreted as a subtraction operation between -@code{arg1} and @code{arg2}. The first two, however, could also be taken -as a command syntax call to function @code{arg1}, in the first case with -options @code{-} and @code{arg2}, and in the second case with option +could be intended by a user to be subtraction operations between +@code{arg1} and @code{arg2}. The first two, however, could also have been +meant as a command syntax call to function @code{arg1}, in the first case +with options @code{-} and @code{arg2}, and in the second case with option @code{-arg2}. Octave uses whitespace to interpret such expressions according to the