02-22-2023 09:51 AM
Hi,
i have this pretty long string that i extract with the VISA read from a test that i do on a board. The problem is that this string is a sort of table with a series of data and number, and i have to separate certain values to check them, in particular i have to check that all the numbers under "ERROR COUNT" are 0 (there are no errors).
I know it might seem easy but i'm not very good on working with strings and arrays.
I leave here the string that i'm talking about,
thank you.
Solved! Go to Solution.
02-22-2023 10:02 AM
Seems nicely formatted with fixed-width fields so the simplest would be to just take substrings. What have you tried? What do you want at the end (a single number for each line (sum of errors)? all the errors? A boolean TRUE/FALSE for errors/no errors?)
02-22-2023 10:25 AM - edited 02-22-2023 10:27 AM
@DavideBrusamolino02 wrote:
Hi,
i have this pretty long string that i extract with the VISA read from a test that i do on a board. The problem is that this string is a sort of table with a series of data and number, and i have to separate certain values to check them, in particular i have to check that all the numbers under "ERROR COUNT" are 0 (there are no errors).
I know it might seem easy but i'm not very good on working with strings and arrays.
I leave here the string that i'm talking about,
thank you.
The most fun way is just to try out all the string stuff and see what works. Try just one field first, then the same field for all the records, then all the fields for all the records.
This proves:
02-22-2023 10:33 AM
As a first step, Please attach a string that actually has some nonzero error count! Makes verification much less error prone. 😄
Assuming you are only interested in the test, error count, and time, here's one simple possibility:
It can easily be expanded to parse the other substrings, of course.
02-22-2023 10:37 AM
@altenbach wrote:
As a first step, Please attach a string that actually has some nonzero error count! Makes verification much less error prone. 😄
Assuming you are only interested in the test, error count, and time, here's one simple possibility:
It can easily be expanded to parse the other substrings, of course.
You took all the fun out of it. 😄
02-22-2023 10:44 AM
Just some Fingerübungen during breakfast. 😄