08-24-2012 09:34 AM
Hi ,
I am reading string array from one txt file and now i want to compare the first character of the each element of this array and read corresponding line.How can i do it?i have attached some picture so you can understand easily.
Solved! Go to Solution.
08-24-2012 09:45 AM - edited 08-24-2012 09:54 AM
use string subset, then compare...
08-24-2012 09:55 AM
Thanks for reply
You did not get my question actually in above picture you can see first character is like
0 o.4755 21
0 0.4766 22
1 0,4822 36
1 0,4877 23
This is my index for measurement.now for another measurement i want to read this first character(index no) and select corresponding row
08-24-2012 10:19 AM
0
0
1
1
this first character itself is index number for my measurement so i want to search this index no and read corresponding line like here i want measured value for no 1
08-24-2012 10:27 AM
@royal1 wrote:
0
0
1
1
this first character itself is index number for my measurement so i want to search this index no and read corresponding line like here i want measured value for no 1
Are you trying to read all of the lines with an index of 1? If not, which one do you read?
08-24-2012 10:39 AM
yes exactly i need all line with character 1(index 1)
08-24-2012 10:41 AM
Hi, I guess u are looking for multiple search result as shown.
If not replace for loop with while loop with "stop" criterion either "i => array size" or search criteria gets any match
08-24-2012 10:54 AM
Yes my friend exactly i want this one
Thank you very much
08-24-2012 11:10 AM
take a look at this, I think this one is better..