11-13-2021 11:59 AM
Hi, I have got an task to make read a file and get the total number of numbers.
example: input file with numbers: 1000 2 33 555 in file, output: 4
input file with numbers: 2 4 6 , output: 3
Solved! Go to Solution.
11-13-2021 03:06 PM
r approach depends on how the file can be defined. Can you get input that would look like this: "1234 12a34"? Would something like this be considered to contain 3 numbers? for me, I would use a regular expression to pick out numbers and simply count the times you get a match.
11-15-2021 03:51 PM - edited 11-15-2021 03:52 PM
I know that Mark's answer is the solution but I don't know if this could help anyone. I remember someone gave me a VI that placed anything that was a number in an array and you simply count the elements via the output. This could be integers, doubles, or singles.