Bug on octave 3.1.51+ with pkg install

John W. Eaton jwe at bevo.che.wisc.edu
Wed Aug 20 14:59:34 CDT 2008


On 20-Aug-2008, John W. Eaton wrote:

| On 18-Aug-2008, Jaroslav Hajek wrote:
| 
| | Since there is no reason to wrap the subfunction
| | is_architecture_dependent in an identity anonymous function, the
| | attached workaround should make the problem vanish (and it is not a
| | temporary solution).
| 
| I applied the changeset.
| 
| | Still, the underlying problem persists, as the subfunction seem to be
| | unreachable in an anonymous function. Not always, though: it seems to
| | work when pkg.m is copied into local directory. I'll try to submit a
| | new bug report for this.
| 
| Does anyone have a simpler test case that shows the problem?  That
| would help, but either way I'll try to look at this problem sometime
| this week.

I found a simpler case:

  function foo ()
    c = {-1, 0, 1};
    cellfun (@(x) sub2 (x), c)
    sub1 (c);
  endfunction
  function sub1 (c)
    cellfun (@(x) sub2 (x), c)
  endfunction
  function y = sub2 (x)
    y = x > 0;
  endfunction

I think the attached patch should solve the problem.

This code will probably have to change again in order to properly
handle nested functions (not planned until after 3.2).

jwe

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080820/611184a0/attachment.ksh 


More information about the Bug-octave mailing list