[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan
From: |
Ben Abbott |
Subject: |
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan |
Date: |
Fri, 18 Mar 2016 00:11:41 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4 |
Follow-up Comment #95, patch #8783 (project octave):
@All, I'm able to build from a fresh archive.
However, I see some unexpected behavior (Mac OS X). textscan does not give
consistent results when using character and file input.
c = textscan (sprintf ('1 2 3\n4 s 6\n'), '%f %f %f', 'ReturnOnError', 1)
c =
{
[1,1] =
1
4
[1,2] =
2
NaN
[1,3] =
3
NaN
}
>> f = tempname ();
>> fid = fopen (f, "w+");
>> fprintf (fid, "1 2 3\n4 s 6\n");
>> fseek (fid, 0, "bof");
>> c = textscan (fid, "%f %f %f", "ReturnOnError", 1);
>> fseek (fid, 0, "bof");
>> fclose (fid);
>> unlink (f);
>> c
c =
{
[1,1] =
1
4
[1,2] = 2
[1,3] = 3
Using Matlab, I get a consistent result.
c = textscan (fid, '%f %f %f', 'ReturnOnError', 1)
c =
[2x1 double] [2] [3]
>> c = textscan (sprintf ('1 2 3\n4 s 6\n'), '%f %f %f', 'ReturnOnError', 1)
c =
[2x1 double] [2] [3]
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8783>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, (continued)
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/16
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/16
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, John W. Eaton, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Mike Miller, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan,
Ben Abbott <=
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Mike Miller, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/18
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Mike Miller, 2016/03/18