21 posts
Posted 22 December 2012 - 07:43 AM
As then title states, passing a string containing "\n" to term.write won't continue the text on a new line. There will just be a "?" in the output. Strangely, "\t" will work and "\n" works perfectly fine in print().
3790 posts
Location
Lincoln, Nebraska
Posted 22 December 2012 - 07:55 AM
I think write counts \n as a character. Unless you use term.redirect(), it will not know what to do with that character.
2217 posts
Location
3232235883
Posted 22 December 2012 - 08:13 AM
term.write is the RAW term function
it only shifts the cursor pos on the X axis
write supports newline and will automatically wrap things to the closest space if they are bigger than the screen
2447 posts
Posted 22 December 2012 - 08:51 AM
Intended. Isn't it obvious by our special handling in write?
21 posts
Posted 22 December 2012 - 11:05 PM
OK, I tried write(), but it adds that weird number at the end, and \b for backspace doesn't seem to work in either function.
2447 posts
Posted 22 December 2012 - 11:08 PM
"weird number"?
21 posts
Posted 22 December 2012 - 11:22 PM
lua> write("Test")
Test0
lua> write("Test\nTest")
Test
Test1
That weird number.
EDIT: OK, nevermind, that's just the return value, of course printed in the same line. Derp. =/