octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54622] test importdata fails in dev octave wi


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows
Date: Mon, 10 Sep 2018 17:04:23 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #47, bug #54622 (project octave):

@Rik, your changeset works for my two test cases on Linux, thanks.

@John, you're on the right track.  Could you print out the value of x
regardless of the case?  I.e., I'm assuming that the path taken is this one in
the failed scenario:


                  else if (std::isalpha (next_char) && ! std::isfinite (x))
                    {
                      // Parsing failed, <Inf|NA|NaN><extra text>
                      j++;  // Leave data initialized to empty_value
                    }


For some reason that "next_char" is 255 rather than -1 in the failing case. 
Of course, 255 is the max 8-bit unsigned, and we are talking about next_char
being an int, so something is not right in this conversion:


                  int next_char = std::tolower (tmp_stream.peek ());
[snip]
                  else if (std::isalpha (next_char) && ! std::isfinite (x))
                    {
                      // Parsing failed, <Inf|NA|NaN><extra text>
                      j++;  // Leave data initialized to empty_value
                    }


Could you also separate that first line into something like


                  int peek_char = tmp_stream.peek ();
printf("peek_char=%d\n", peek_char);
                  int next_char = std::tolower (peek_char);


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54622>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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