bugGNU Octave - Bugs: bug #34497, 'clear -f' does not work for...

 
 

bug #34497: 'clear -f' does not work for command line functions

Submitter:  Rik <rik5>
Submitted:  Thu 06 Oct 2011 06:18:51 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 23 Jul 2012 04:56:14 PM UTC, comment #3: 
Max Brister <fisheater>
Fri 07 Oct 2011 04:21:40 PM UTC, comment #2: 

A second example of the same issue is test functions declared with the '%!function' syntax.  Tests are run by the script test.m which uses eval to bring test functions into existence.  It uses 'clear function_name' after the test to remove them from the user's workspace.  Because clear does not work for command line functions these test functions do end up polluting the user's workspace.

Example code


which xassert
test unwrap
PASSES 5 out of 5 tests
which xassert
`xassert' is a command-line function


Rik <rik5>
Group administrator
Thu 06 Oct 2011 08:12:41 PM UTC, comment #1: 
John W. Eaton <jwe>
Group administrator
Thu 06 Oct 2011 06:18:51 PM UTC, original submission:  

This is a regression that happened between versions 3.0.5 and 3.2.3.

The following code fragment demonstrates the issue


function y = junk (x)
  y = sin (x);
endfunction
which junk
junk (1)
clear -f junk
which junk
junk (2)
clear -all
which junk
junk (3)


Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by fisheater (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-23 fisheater Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code