Mercurial > hg > octave-lojdl
changeset 10260:14d5fee02b3b
basic support for comparing function handles
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 03 Feb 2010 12:49:17 +0100 |
parents | 65b41bc71f09 |
children | a4fb4675accb |
files | scripts/ChangeLog scripts/general/private/__isequal__.m src/ChangeLog src/OPERATORS/module.mk |
diffstat | 4 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-02-03 Jaroslav Hajek <highegg@gmail.com> + + * general/private/__isequal__.m: Handle function handles. + 2010-02-01 David Bateman <dbateman@free.fr> * plot/__go_draw_axes__.m (get_old_gnuplot_color): Remove as
--- a/scripts/general/private/__isequal__.m +++ b/scripts/general/private/__isequal__.m @@ -141,6 +141,11 @@ endfor t = all (strcmp (reshape (x, 1, []), strings)); + elseif (isa (x, "function_handle")) + + ## The == operator is overloaded for handles. + t = all (cellfun (@eq, {x}, varargin)); + else ## Check the numeric types.