octave-maintainers
[Top][All Lists]
Advanced

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

Newer Versions of Octave Struggle with Character Strings


From: evansste
Subject: Newer Versions of Octave Struggle with Character Strings
Date: Mon, 3 Jul 2017 08:03:26 -0700 (PDT)

I've noticed that Octave 4.0.0 and 4.0.3 struggle to handle character strings
that contain a significant number of elements.  When attempting to handle
operations with large character strings, these versions return the known
error message:

error: input buffer overflow, can't enlarge buffer because scanner uses
REJECT
input buffer overflow, can't enlarge buffer because scanner uses REJECT

However, I've noticed that when running the same program, Octave 3.8.1
performs with no issues.

The circumstances, under which this error message occurs, are quite
peculiar.  The following script won't cause the above error message to occur
with Octave 4.0.0.

alphabet = 'abcdefghijklmnopqrstuvwxyz';
for     n = 1:15
        alphabet = [alphabet alphabet];
end
instances = find(alphabet=='j');

However, if the "alphabet" variable is declared as a character string,
rather than building it using the loop, the error will occur.  For instance,
if the script were the following, you'd get the error message.

alphabet = 'abcdefghijklmnopqrstuvwxyz ... abcdefghijklmnopqrstuvwxyz';
instances = find(alphabet=='j');

The "alphabet" variable contains 851968 characters.  For this reason, I used
an ellipsis (...) to describe it.  However, if the script contains the
actual 851968-character character string, the error will occur.

I don't currently have Octave 3.8.1 installed on my computer, but similar
tests have shown that the error probably won't occur with Octave 3.8.1.  Why
is that?  Why is it that Octave 3.8.1 can handle the larger declaration of a
character string, but newer versions (Octave 4.0.0 and 4.0.3) can't?

I want to thank the developers for providing Octave.  It's an excellent
computing tool, and I'm happy to be one of its users.  Please consider my
character string observation as a tool to further improve your wonderful
software.  In any case, thank you for offering Octave to the world.









--
View this message in context: 
http://octave.1599824.n4.nabble.com/Newer-Versions-of-Octave-Struggle-with-Character-Strings-tp4683973.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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