Is there a way to name lists? [v.44] [FIXED]

(Read-only) To re-open a bug, start a new thread in the Bugs forum.

Moderator: MSandro

Locked
Rowan Ramsey
Posts: 13
Joined: Sep 25th, '15, 22:43

Is there a way to name lists? [v.44] [FIXED]

Post by Rowan Ramsey » Dec 30th, '15, 20:14

I am trying to create a table system that will create rows and columns depending on the data that is given and I need to be able to differentiate the lists. Currently as far as I can see, there is no way of doing this. I will supply my code with this post so you might see what i'm trying to do. Thanks, BYe
Attachments
recovered2.gpp
(6.18 KiB) Downloaded 383 times

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: Is there a way to name lists? [v.44]

Post by JohnM » Jan 1st, '16, 12:45

You can distinguish lists by putting them into different variables.

It looks like you are trying to write code to fill a table with some data. There are several ways to do that. One way is to add each row as a list, as you did in your project:
Screen Shot 2016-01-01 at 7.32.24 AM.png
Another approach is to provide the data as one big piece of text, then break the text into lines and break each line into a list of words that you add as a new row:
Screen Shot 2016-01-01 at 7.36.18 AM.png
Of course, the text could be read from a file using the "read file" block rather than being part of your code. That way, you can use a text editor to enter and edit the data.

Using the "words" block to break a line into fields doesn't work if you want some of your fields to include spaces (or other "white space" characters. In that case, you could separate the fields with commas or tabs and read the data from a file using the "table from file" block.

I hope one of these approaches will solve your problem.

Rowan Ramsey
Posts: 13
Joined: Sep 25th, '15, 22:43

Re: Is there a way to name lists? [v.44]

Post by Rowan Ramsey » Jan 1st, '16, 21:29

Thanks so much this males my job so much easier.

Locked