bugGNU Octave - Bugs: bug #39922, type () fails to display the...

 
 

bug #39922: type () fails to display the content of an ASCII file with no extension

Submitted by:  Julien Bect <jbect>
Submitted on:  Mon 02 Sep 2013 08:32:17 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Julien BectOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 10 Sep 2013 03:23:11 AM UTC, comment #3:

I fixed this on the development branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/a1fa416c7c4a). I also clarified the documentation to note that 'type' works on ordinary files, variables, operators, keywords, and not just m-files.

Rik <rik5>
Project Administrator
Fri 06 Sep 2013 02:25:26 PM UTC, comment #2:

I confirm that type displays the content of the file if I rename it to README.txt instead of README.

According to the documentation, however, nothing should be displayed since README.txt is not a function:

Julien Bect <jbect>
Wed 04 Sep 2013 01:38:39 AM UTC, comment #1:

Semi-confirmed. Type in Octave will actually display the content of files as long as they have a . in their name, so for example README.txt should work but README doesn't work.

From inside the Octave build tree:

Mike Miller <mtmiller>
Project Member
Mon 02 Sep 2013 08:32:17 AM UTC, original submission:

In Octave, type () fails to display the content of an ASCII file that is not an m-file.

In Matlab, on the other hand:

It seems that the intended role of type () is thus quite different in Matlab (where it simply displays the content of ANY ascii file) and in Octave.

Julien Bect <jbect>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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 mtmiller (Posted a comment)
  • -unavailable- added by jbect (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Sep 2013 03:23:11 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 04 Sep 2013 01:38:39 AM UTCmtmillerStatusNone=>Confirmed
      Operating SystemGNU/Linux=>Any
      Summarytype () fails to display the content of an ASCII file that is not an m-file=>type () fails to display the content of an ASCII file with no extension

    Back to the top


    Powered by Savane 3.1-cleanup