bugGNU Octave - Bugs: bug #51888, scanf / fscanf / sscanf should be...

 
 

bug #51888: scanf / fscanf / sscanf should be able to return int64 / unit64 values

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Tue 29 Aug 2017 06:16:58 PM UTC  
 
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 07 Sep 2017 07:53:06 PM UTC, comment #1:

I got something working for the scanf(..., "C") case, but I wondered if we should make it always return integer types for any integer conversion?

For the non-C form we have to remain Matlab compatible, but for the C form, scanf returns a cell array so we could return whatever types we want.

Mike Miller <mtmiller>
Project Administrator
Tue 29 Aug 2017 06:16:58 PM UTC, original submission:

According to Matlab's docs for fscanf and sscanf, if the format string conversions are all signed 64-bit integer conversions ("%ld" or "%li"), then the return value should be a int64-valued array. If the format string is entirely unsigned 64-bit conversions ("%lo", "%lu", or "%lx"), then the return value should be a uint64-valued array.

This was discussed and confirmed in bug #47741, but a new bug was never filed for this remaining outstanding compatibility issue.

We might want to extend this to also cover the Octave scanf extension using the "C" option, which uses a different code base for its conversions.

Mike Miller <mtmiller>
Project 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 mtmiller (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.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3