bugGNU Octave - Bugs: bug #38851, (MATLAB) 'W' specifier in fopen


bug #38851: (MATLAB) 'W' specifier in fopen

Submitted by:  Guillaume <gyom>
Submitted on:  Mon 29 Apr 2013 03:18:49 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  John W. Eaton <jwe>
Originator Name:  Guillaume Open/Closed:  Closed
Release:  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.


Mon 29 Apr 2013 06:34:36 PM UTC, comment #3: 
John W. Eaton <jwe>
Project AdministratorIn charge of this item.
Mon 29 Apr 2013 04:51:25 PM UTC, comment #2: 

Oops, I see the problem.  I'll fix it.

John W. Eaton <jwe>
Project AdministratorIn charge of this item.
Mon 29 Apr 2013 04:02:04 PM UTC, comment #1: 

I can confirm the warning message and error return value for both "W" and "R". The warning message sounds like it's doing the right thing, but the file is not opened.

A mode of "A" should also be treated like "a" for compatibility.

Mike Miller <mtmiller>
Project Administrator
Mon 29 Apr 2013 03:18:49 PM UTC, original submission:  

I tried to use specifier 'W+' instead of 'w+' in my ( MATLAB) code for fopen.
In Octave, a warning is displayed but the returned file identifier is -1:

octave> fp =fopen('file.dat','W+')
warning: fopen: treating mode "W" as equivalent to "w"
fp = -1

while it opens a file ok when using 'w+':

octave> fp =fopen('file.dat','w+')
fp = 3

Guillaume <gyom>


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

Attach Files:

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 jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)

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

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-29 jwe StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2013-04-29 jwe StatusConfirmed => In Progress
        Assigned toNone => jwe
    2013-04-29 mtmiller CategoryNone => Interpreter
        StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.5