PRINT outputs additional newlines when simply printing long strings that contain lots of spaces to the console.
Just execute these two PRINTs and copy the output from the console and paste it into an editor that can handle long strings. You will see that the X-string wraps (had returns inserted) and the Z-string does not.
Code: Select all
print "[X X X X X X XX X X X X XX X X X X X XX X X X X X X XX XX X X X XX X XXXX X XX X X X X XX X XX X X XXX X X XX XXXX XXXXX XX X XX X X X X X X X XXXX X X XX X XXX X XX XXX X X X]"
print "[Z____________________Z_Z__________Z__Z__Z___ZZ_______Z_Z__________Z______Z____ZZ___Z_Z___Z_Z______Z________ZZ__Z______Z__Z__Z_____Z_Z__ZZ___ZZ___Z____Z___Z___ZZ_____Z_______ZZZZ_Z__ZZ___Z____Z_______Z____Z__ZZ__Z_ZZ_Z_____Z________ZZZ_Z___Z___ZZ________ZZZZ____ZZZZZ__ZZ_Z____ZZ_Z___Z_Z_Z______Z__Z__Z___ZZZZ______Z_____Z______ZZ_Z_ZZZ__Z______ZZ_ZZZ____Z________Z___Z]"
Although the line breaks can be different, depending on the string, they always show up at the same points for any given string.
Any ideas as to why PRINT doesn't always output to the console as expected?
Thanks,
CBruce