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

Multiple line strings in tables.

Started by Agent Silence, 20 May 2014 - 05:52 PM
Agent Silence #1
Posted 20 May 2014 - 07:52 PM
How do you put multiple line strings in a table, like

table = {
["string1"] = "This is a multiple line string"
					 "Or atleast tried to be" }
print(table["string1"])
I need it for a data system im making btw
Lyqyd #2
Posted 20 May 2014 - 10:15 PM
You can use block quotes or the newline character to create multi-line strings.
KingofGamesYami #3
Posted 20 May 2014 - 10:17 PM
I think

local table = {
[[
Hello
This
is
a
string
]]
print(table[1])
But I could be wrong.
Edit: Ninja'd
Edited on 20 May 2014 - 08:17 PM