How to add different label for different columns?

Hello, everybody!
I am trying to add labels to the data.
I have data in a file divided by space:

1 2 3 4 5 6
7 8 9 10 11 12

I need it to look like this:

label_1: 1 2 3 4 5
label_2: 6
label_1: 7 8 9 10 11
label_2: 12

How can this be done?
Thanks for help
hi,
if i understand the algorithm that labeling will be for is :
label 1 will read 5 numbers and label 2 will read 1 number.....right

So, as you know when u will read from file you will be reading line by line
thus , you can do the following:
1-declare on variable "counter">>if the counter is divisible by 5 then label one has filled
and you can make another reading for label 2
2- your reading from the file will be saved in strings (whole file in array of strings>>2 know number of lines in the file)
3- you will loop through your charterer of strings and each time your counter will be incremented
4- you manage your display

hopefully i gave you the idea know you can use your programming mind to solve the puzzle
Topic archived. No new replies allowed.