Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

When running through my DNA program, I came across an issue where excessively long strings became invisible in the Eclipse text file editor, and as a consequence were absent in the console when the program finished running. The characters are still there and being used in the other methods, but the string the program is supposed to be reading isn't printing in the console. Does anyone know why this is happening?

I believe it has to do with some sort of character limit per line, but I'm not sure. After deleting some of the characters from these strings, they reappeared, but when I added more characters back in, they became invisible. Regardless, this is confusing and I'd like to know how to work around this.

asked in CSC212_Spring2019 by (1 point)
edited by

3 Answers

+3 votes
 
Best answer

Turns out that this is a bug of sorts from within Eclipse that is triggered by attempting to print too many characters on a line in the console. While it does not impact how the program runs, it is possible to select characters -- literally invisible characters -- and paste them into another text field, where they will appear. If anyone has a solution to this bug, please notify everyone in this thread.

Until then, the correct answer is... No answer! This is a bug.

answered by (1 point)
0

Not sure, but this might be fixable by changing some Eclipse settings... at least, you might try the proposed answers here: https://stackoverflow.com/questions/9312855/eclipse-console-doesnt-show-the-whole-output

+3 votes

So the dna.txt data file works fine, but this issue comes up with the ecoli.txt data file? That's the one with the really long lines.

answered by (1 point)
0

Correct, this is an issue with the ecoli.txt data file. dna.txt works perfectly well, but ecoli.txt contains very long lines which tend to disappear both in the Eclipse text editor and in the console when the program runs.

+3 votes

When I open the ecoli.txt file in Eclipse, I can scroll to the right and see all of the characters on one line....and some are really long.

When I execute the DNA program with the ecoli.txt file, I can scroll in the console window to see all of the output on one line even if it extends a long ways to the right.

So it seems that the file and the output have the same number of characters.

The output I posted in Moodle was copied from my console window and pasted into a Word document which I saved as a pdf. The length of the Strings read in from the file seem to agree with the number of characters that the file has in it.

answered by (1 point)
...