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

\n, ...

Started by Sewbacca, 09 March 2016 - 03:42 PM
Sewbacca #1
Posted 09 March 2016 - 04:42 PM
Are there other chars, which do the same work like /n?
Edited on 10 March 2016 - 05:23 PM
MKlegoman357 #2
Posted 09 March 2016 - 04:45 PM
\r - carriage return
\z - the byte 0 (0x0)
\t - tab
\b - backspace (I think it's also called bell, not too sure)

That's some I can remember right now off the top of my head.
KingofGamesYami #3
Posted 09 March 2016 - 04:51 PM
\a bell
\b back space
\f form feed
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\" double quote
\' single quote
\[ left square bracket
\] right square bracket

http://www.lua.org/pil/2.4.html
Sewbacca #4
Posted 09 March 2016 - 05:41 PM
I mean, are there other chars, which do the same work like \n, so creates a new line?
Lyqyd #5
Posted 09 March 2016 - 05:49 PM
You can adjust the cursor position. Why are you looking for duplicates of the newline character that aren't the newline character?
Anavrins #6
Posted 09 March 2016 - 06:03 PM
There's also \0 \1 \2 … \128 … \255, etc… which are the same as string.char(0) string.char(1) string.char(2) string.char(128) string.char(255), etc…
The newline byte is 0x0A, which means you can also newline with \10.
Edited on 09 March 2016 - 05:05 PM
Sewbacca #7
Posted 09 March 2016 - 09:43 PM
I solved it
Thanks anyway!