# HG changeset patch # User Rik # Date 1411274735 25200 # Node ID c432232450852ec61a291ba6d7e8810319344906 # Parent 3cb64f94294ff832b60253b465c8bcc0cd7cd7da doc: Add warnings about eventual removal of inline functions. * NEWS: Announce eventual deprecation of inline. * func.txi: Document eventual deprecation of inline in manual. * ov-fcn-inline.cc (Fformula): Add seealso link to char. diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -84,6 +84,13 @@ sylvester zoom + ** inline() scheduled for eventual deprecation by Matlab + + Functions created through the use of inline are scheduled for deprecation + by Matlab. When this occurs Octave will continue to support inline + functions for an indeterminate amount of time before also removing support. + All new code should use anonymous functions in place of inline functions. + ** Deprecated functions. The following functions have been deprecated in Octave 4.2 and will diff --git a/doc/interpreter/func.txi b/doc/interpreter/func.txi --- a/doc/interpreter/func.txi +++ b/doc/interpreter/func.txi @@ -1404,6 +1404,10 @@ After this it is possible to evaluate @math{f} at any @math{x} by writing @code{f(x)}. +@strong{Caution}: @sc{matlab} has begun the process of deprecating inline +functions. At some point in the future support will be dropped and eventually +Octave will follow @sc{matlab} and also remove inline functions. Use anonymous functions in all new code. + @DOCSTRING(inline) @DOCSTRING(argnames) diff --git a/libinterp/octave-value/ov-fcn-inline.cc b/libinterp/octave-value/ov-fcn-inline.cc --- a/libinterp/octave-value/ov-fcn-inline.cc +++ b/libinterp/octave-value/ov-fcn-inline.cc @@ -853,9 +853,10 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} formula (@var{fun})\n\ Return a character string representing the inline function @var{fun}.\n\ +\n\ Note that @code{char (@var{fun})} is equivalent to\n\ @code{formula (@var{fun})}.\n\ -@seealso{argnames, inline, vectorize}\n\ +@seealso{char, argnames, inline, vectorize}\n\ @end deftypefn") { octave_value retval;