octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #32088] Feature request: -ALL option for WHICH


From: Guillaume
Subject: [Octave-bug-tracker] [bug #32088] Feature request: -ALL option for WHICH
Date: Mon, 31 Jan 2011 13:36:16 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.13) Gecko/20101203 SUSE/3.6.13-0.2.1 Firefox/3.6.13

Follow-up Comment #7, bug #32088 (project octave):

I agree that changing __which__ is the way forward.

There does not seem to be a mention of the order of the results to '-all' in
the MATLAB documentation but, in practice, the order corresponds to the order
of how the matching results are found in the path, so that the first one would
actually be the function called. The output is like this:

++
>> which -all foo
/home/login/dir1/foo.m
/home/login/dir2/foo.m % Shadowed
--

For methods, you get:

++
>> which @foo/bar % the '@' is not necessary
/home/login/dir1/@foo/bar.m %foo method
>> which -all @foo/bar
/home/login/dir1/@foo/bar.m %foo method
/home/login/dir2/@foo/bar.m %foo method
--

At last, concerning subfunctions, I was not aware of the ">" notation and
this is not mentioned in the MATLAB documentation, but it works:

++
>> which @foo/bar>sub
/home/login/dir1/@foo/bar.m (sub) % Subfunction of bar
>> which -all @foo/bar>sub
/home/login/dir1/@foo/bar.m (sub) % Subfunction of bar
>> which -all sub in @foo/bar
/home/login/dir1/@foo/bar.m (sub) % Subfunction of bar
--

i.e. the '-all' option does not work for subfunctions of methods of a class.
It seems to me, however, to be of a very specific and limited use.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32088>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]