# HG changeset patch # User Rik # Date 1334123561 25200 # Node ID b8edefd8c111ecd6d29a6ae8808c5f60a0624d0b # Parent 1f922eedf9cec8cd159a65ac795a23ea94930738 NEWS: Expand section on nested functions and clarify regexprep changes. * NEWS: Expand section on nested functions and clarify regexprep changes. diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -1,6 +1,32 @@ Summary of important user-visible changes for version 3.8: --------------------------------------------------------- + ** Octave now supports nested functions with scoping rules that are + compatible with Matlab. A nested function is one declared and defined + within the body of another function. The nested function is only + accessible from within the enclosing function which makes it one + method for making private functions whose names do not conflict with those + in the global namespace (See also subfunctions and private functions). + In addition, variables in the enclosing function are visible within the + nested function. This makes it possible to have a pseudo-global variable + which can be seen by a group of functions, but which is not visible in + the global namespace. + + Example: + function outerfunc (...) + ... + function nested1 (...) + ... + function nested2 (...) + ... + endfunction + endfunction + + function nested3 (...) + ... + endfunction + endfunction + ** 'emptymatch', 'noemptymatch' options added to regular expressions. With this addition Octave now accepts the entire set of Matlab options @@ -15,11 +41,8 @@ ** For compatibility with Matlab, the regexp, regexpi, and regexprep functions now process backslash escapes in single-quoted pattern - strings. The regexprep function now processes backslash escapes in - single-quoted replacement strings. - - ** Octave now supports nested functions with scoping rules that are - compatible with Matlab. + strings. In addition, the regexprep function now processes backslash + escapes in single-quoted replacement strings. ** Redundant terminal comma accepted by parser