P
P
Pavel Padozhnikov2015-10-09 22:13:48
Programming
Pavel Padozhnikov, 2015-10-09 22:13:48

How to make a tree topology in a table?

It is possible to create a table in which to write the table and so continue as long as necessary.
I know how to do this with a limited number of table attachments.
LUA

table = {}
test2 = "New"

table[test1] = "Set Group"
table[test2] = {}

t = table[test2]
t[test1] = "New arg"
t[test2] = {}

this way you can programmatically create as much as you like, but I want to learn how to make an infinite replenishment without manually adding new tables.
I will be grateful for the code in LUA or another language, and in general for any suggestive thought.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2015-10-10
@coderisimo

I'll draw an answer for you (c) :)
or maybe I just don't know what a tree is?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question