Re: Newline is ignored at end of string in text windows
Posted by
Krs5 on
Jul 05, 2018; 9:38am
URL: http://imagej.273.s1.nabble.com/Newline-is-ignored-at-end-of-string-in-text-windows-tp5020909p5020913.html
Dear Stein,
If you change the line print("\n\n"); to print("\n\n "); or print("\n","\n"); it works as well.
Best wishes
Kees
-----Original Message-----
From: Stein Rørvik [mailto:
[hidden email]]
Sent: 05 July 2018 09:08
To:
[hidden email]
Subject: Newline is ignored at end of string in text windows
There is an issue with the way the linebreak \n symbol is handled when writing to text windows.
If the line ends in an explicit \n symbol (to give an extra linebreak), it is just ignored.
See the following three cases which one would expect to give the same result; the third one is printed wrongly.
This could perhaps also be a windows-only issue, perhaps related to the previous one I just posted to the list.
print("\\Clear");
print("----------");
print("abc");
print(""); //ok
print(""); //ok
print("123");
print("----------");
print("abc");
print("\n\n123"); //ok
print("----------");
print("abc");
print("\n\n"); //entire string is ignored
print("123");
print("----------");
I am using daily build ImageJ 1.51e with Java 1.6 on Windows 7/64-bit.
Stein
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html