[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #33971] strread.m: fixed width format specifie

From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #33971] strread.m: fixed width format specifier extending beyond EOLs
Date: Tue, 09 Aug 2011 21:08:54 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100701 SeaMonkey/2.0.6

Follow-up Comment #1, bug #33971 (project octave):

Here's a patch to let the user get away with too wide field width specifiers,
cf. ML. 
Also user-specified last literals wider than the last one on the lines in a
file are allowed (but in the file all these have to be identical)

Difference here is that Octave yields a warning in such a situation if
detected in the first "line" of the file or string.

Hunks #1 and #2 take care of that.

Hunk #3 is a bug fix needed now for the following situation (w. only hunks #2
& #3):

octave.exe:2> [a, b] = strread ("1 2", "%s %2s")
warning: strread: Field width '%2s' (fmt spec # 2) extends beyond word limit
error: strread: A(I,J): row index out of bounds; value 2 out of bound 1
error: called from:
error:   x:octaveoctave-3.5.0+shareoctave3.5.0+miostrread.m at line 499,
column 11

(I had this mod (hunk #3) in mind for some time but never hit the situation
where it was needed - I now see that was because it was catched by the error
stmts higher up that hunks #1 & #2 change into a warning.)

My source tree got mixed up, so no hg changeset but a diff -u, sorry.
Proposed changelog:

2011-08-09 Philip Nienhuis <address@hidden>

    Allow fixed width format specifiers to extend beyond actual
    word width but give suitable warning (bug #33971)
    Files: strread.m

(file #23773)

Additional Item Attachment:

File name: strread.m.diff_2011aug9#2      Size:2 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]