I am learning BASIC and working now in GEM Locomotive BASIC (1986) on '86 Amstrad PC1512DD (8MHz, 512 ram, 5.25" 360 kb floppies)
I am randomly generating numbers in a range with a program that prints numbers in loop as
PRINT;n
First, it prints a number, then adds a randomly generated value. This continues until it reaches a maximum value, then the program stops.
What I would like to do is to count up the number of outputs once the program stops at the end, not to add numbers.
For example, if line has numbers
20 100 1500 125
That should count as 4, as each is separate value rather than sum them as 1745. This is just an example, and I may have thousands of outputs.
Maybe to treat that numbers convert to strings then to count up string somehow? Any help will be much appreciated please.
Not easy to verify this but after tracking down an Amstrad 486 CPC emulator, I was able to verify this works.