J
John
I need to figure out how to write a loop that will do the
following things. I need to arrange a spreadsheet that
contains information on lines into an ordered fashion.
The first column says the line number. The next three
columns tell the children of the line. For example if
101, 102, and 103 are connected to 100, 100 would be
listed with three children (101, 102, and 103). Here is
what the file looks like if 101, 102, and 103 also had
children.
Line Child Child Child
100 101 102 103
101 104
104
102 105 106
105
106
103 107
107
This file would denote line 100 as the starting line.
100 branches into three other lines (101, 102, and 103).
101 branches into 104. 104 has no children. 102 then
branches itno 105 and 106. Etc...
The file that I just showed is ordered. However, my file
is not. I know what line is the first line and have
already written the part of the program to move that line
to the beginning of the file. However, I need to write a
loop that will pick the first child and list it next.
Then it will list that child's children next. If it
doesn't have any children, it will go back to the last
child that hasn't been listed and go from there. Like I
said, the file that I listed is organized in the fashion
that I need. I don't know what types of loops to write
or how to get started. Thank you very very much. If you
need any other information, I can provide it. Thanks
again.
following things. I need to arrange a spreadsheet that
contains information on lines into an ordered fashion.
The first column says the line number. The next three
columns tell the children of the line. For example if
101, 102, and 103 are connected to 100, 100 would be
listed with three children (101, 102, and 103). Here is
what the file looks like if 101, 102, and 103 also had
children.
Line Child Child Child
100 101 102 103
101 104
104
102 105 106
105
106
103 107
107
This file would denote line 100 as the starting line.
100 branches into three other lines (101, 102, and 103).
101 branches into 104. 104 has no children. 102 then
branches itno 105 and 106. Etc...
The file that I just showed is ordered. However, my file
is not. I know what line is the first line and have
already written the part of the program to move that line
to the beginning of the file. However, I need to write a
loop that will pick the first child and list it next.
Then it will list that child's children next. If it
doesn't have any children, it will go back to the last
child that hasn't been listed and go from there. Like I
said, the file that I listed is organized in the fashion
that I need. I don't know what types of loops to write
or how to get started. Thank you very very much. If you
need any other information, I can provide it. Thanks
again.