[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31392] fix for case insensitivity of optimset
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #31392] fix for case insensitivity of optimset options |
Date: |
Mon, 13 Dec 2010 11:00:45 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.19) Gecko/2010102906 Iceweasel/3.0.6 (Debian-3.0.6-3) |
Follow-up Comment #7, bug #31392 (project octave):
There is still a small mistake that prevents it from working: The lookup is
done in _uppercase_, but the stored sort-order is in _lowercase_:
in __all_opts__.m:
[lnames, idx] = unique (tolower (names));
...
names = names(idx);
It must be both uppercase or both lowercase, otherwise, e.g.:
octave:1> munlock ("__all_opts__")
octave:2> clear __all_opts__ # for reproducibility
octave:3> function ret = test_options (arg)
> ret = optimset ("a_b", 1, "ab", 2, "c", 3);
> endfunction
octave:4> __all_opts__ ("test_options")
ans =
{
[1,1] = a_b
[1,2] = ab
[1,3] = c
}
octave:5> optimset ("ab", 1);
warning: unrecognized option: ab
octave:6>
And a typo: lookup is still called with "i" in optimset.m
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31392>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/