Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21883

Counting Segments of Lines to End of File, and Recording Last Segment Number

$
0
0
If I were to count each number before each comma right to the end of the file (the last number would mean a total count of 54), how would I do it?

Here is a sample of the text file:

Code:

2,4,6,8,2,4,10,3,11,7,3,17,15,12,5,13,1,14
7,3,17,15,12,5,13,1,14,2,4,6,8,2,4,10,3,11
10,3,11,7,3,17,15,12,5,13,1,14,2,4,6,8,2,4

There are 54 numbers in total in this example (18 X 3). If I were to use i = i + 1 to tally each number, intLightSeq(i) to record each number in the text file, and use MaxLightSeq to record the last number designated in the # in intLightSeq(#) (in this case, MaxLightSeq = intLightSeq(i) if i = 54), how could it be coded?

Viewing all articles
Browse latest Browse all 21883

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>