This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
bigbaddevil6's profile picture

Escape Characters

Started by bigbaddevil6, 21 April 2014 - 07:06 PM
bigbaddevil6 #1
Posted 21 April 2014 - 09:06 PM
Does CC support escape characters such as new line feed or carriage return? when ever I try using those the readout just gives me a "?" where the \n or the \r would be. I know it works with ", ', \, so leaves me to believe it would.
Lyqyd #2
Posted 21 April 2014 - 10:03 PM
You're trying to write those characters directly to the device (term.write or monitor.write). You need to instead manually move the cursor yourself (term/monitor.setCursorPos) or redirect the terminal to the monitor if necessary and use write() or print(), which will handle moving the cursor for you.
bigbaddevil6 #3
Posted 21 April 2014 - 11:18 PM
ahh ok.