Mercurial > octave
diff doc/interpreter/basics.txi @ 30321:2ba4758654ca
deprecate ** and .** operators (bug #60882)
* lex.h, lex.ll (base_lexer::warn_deprecated_operator): New function.
(CMD_OR_DEPRECATED_OP): New macro.
(".**", "**"): Use it.
* basics.txi, expr.txi, vectorize.txi: Eliminate descriptions of the
'**' and '.**' operators from the manual.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 22 Nov 2021 16:22:54 -0500 |
parents | 605275522c37 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/doc/interpreter/basics.txi Mon Nov 22 15:41:42 2021 -0500 +++ b/doc/interpreter/basics.txi Mon Nov 22 16:22:54 2021 -0500 @@ -876,7 +876,7 @@ have typed. For example, if you misspell a keyword, @example -octave:13> function y = f (x) y = x***2; endfunction +octave:13> function z = f (x, y) z = x ||| 2; endfunction @end example @noindent @@ -888,8 +888,8 @@ syntax error ->>> function y = f (x) y = x***2; endfunction - ^ +>>> function z = f (x, y) z = x ||| y; endfunction + ^ @end group @end example @@ -897,9 +897,9 @@ For most parse errors, Octave uses a caret (@samp{^}) to mark the point on the line where it was unable to make sense of your input. In this case, Octave generated an error message because the keyword for -exponentiation (@code{**}) was misspelled. It marked the error at the -third @samp{*} because the code leading up to this was correct but the final -@samp{*} was not understood. +the logical or operator (@code{||}) was misspelled. It marked the error +at the third @samp{|} because the code leading up to this was correct +but the final @samp{|} was not understood. Another class of error message occurs at evaluation time. These errors are called @dfn{run-time errors}, or sometimes