Regression: Subfunctions not cleared upon function reload

John W. Eaton jwe at bevo.che.wisc.edu
Sun May 4 20:46:43 CDT 2008


On  4-May-2008, Moritz Borgmann wrote:

| Let's say I have the following files:
| 
| ============ testfun1.m ============
| function testfun1 ()
| testscript;
| 
| function testsubfun ()
| disp ('testsubfun in testfun1');
| ==================================
| 
| ============ testscript.m ============
| f = str2func ('testsubfun');
| f ();
| ==================================
| 
| This gives
| octave:5> testfun1 ()
| testsubfun in testfun1
| 
| Now if I comment out the testsubfun subfunction in testfun1.m and 
| save the file, Octave still gives exactly the same result. Instead, 
| it should bail out and complain that testsubfun is not defined. It 
| seems like subfunctions are not properly cleared from the symbol 
| table upon reload of a function.

The following change seems to fix this problem.

Thanks,

jwe

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


More information about the Bug-octave mailing list