bugGNU Octave - Bugs: bug #40462, type does not display functions...

 
 

bug #40462: type does not display functions defined on the command line

Submitted by:  None
Submitted on:  Sun 03 Nov 2013 11:24:10 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: AdrianOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 20 May 2015 03:06:12 PM UTC, comment #5:

I applied jwe's changes from 2013 since they work without modification on the current development branch (http://hg.savannah.gnu.org/hgweb/octave/rev/abf85f8cbd6c).

Rik <rik5>
Project Administrator
Sun 28 Dec 2014 04:26:02 PM UTC, comment #4:

@jwe: It is well past the 3.8. release which was the gating item for applying your contributed patch. Do you want to apply it to the dev branch now?

Rik <rik5>
Project Administrator
Thu 07 Nov 2013 08:54:47 AM UTC, comment #3:

I'm attaching a possible patch. I'm not sure this is appropriate for the 3.8 release. It may need a little more testing.

(file #29556)

John W. Eaton <jwe>
Project Administrator
Tue 05 Nov 2013 04:15:40 AM UTC, comment #2:

It did work at one time by reconstructing the program text from the parse tree. It would be easy to have it do that again. Or we could maybe do better by using the exact text from the command line input instead.

John W. Eaton <jwe>
Project Administrator
Tue 05 Nov 2013 01:43:13 AM UTC, comment #1:

Confirmed on dev. Marking as a feature request for now, since I'm not sure if this ever worked in prior versions of Octave.

This would also allow functions defined in the interpreter to be edited and turned into function files, since edit uses type to extract the body of the function that it puts into a newly created m-file.

Mike Miller <mtmiller>
Project Administrator
Sun 03 Nov 2013 11:24:10 PM UTC, original submission:

The following produces an error:

The help says that type will "Display the definition of each NAME that refers to a function", so I expected to see foo's definition.
It seems that "type" works properly for functions defined in a *.m file, but not for functions declared interactively.

I use octave 3.6.4 on Debian-GNU/Linux, but according to Philip Nienhuis this bug is still present in the development branch 3.7.7+ (see bug #40452 on clearing this type of functions), whence the 'dev' release tag on this bug.

cheers, Adrian

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29556:  diffs.txt added by jwe (3KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 May 2015 03:06:12 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 28 Dec 2014 04:26:02 PM UTCrik5StatusConfirmed=>Patch Submitted
    Thu 07 Nov 2013 08:54:47 AM UTCjweAttached File-=>Added diffs.txt, #29556
    Tue 05 Nov 2013 01:43:13 AM UTCmtmillerCategoryNone=>Interpreter
      Item GroupNone=>Feature Request
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1