Page 1 of 1
Is there a way to name lists? [v.44] [FIXED]
Posted: Dec 30th, '15, 20:14
by Rowan Ramsey
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
Re: Is there a way to name lists? [v.44]
Posted: Jan 1st, '16, 12:45
by JohnM
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:
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:
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.
Re: Is there a way to name lists? [v.44]
Posted: Jan 1st, '16, 21:29
by Rowan Ramsey
Thanks so much this males my job so much easier.