Hi
I have a program that determines how many numbers in an array
begins with a given number, however, if the number ends in zero
I want to exceed it. The part of the program that does this is
as follow:
a$ = (the desired number)
FOR i = 1 TO n
IF LEFT$(n$(i), 1) = a$ THEN
a = a + 1
IF RIGHT$(n$(i), 1) = "0" THEN b = b + 1
END IF
NEXT
Later I subtract b from a to obtain the number that are accept-
able. In some test data "a" was correct but the one number that
ended in a zero the program failed to pickup.
I tried the following one line:
IF LEFT$(n$(i), 1) = a$ AND RIGHT$(n$(i), 1) = "0" THEN b = b + 1
This one line had the same results or should I say the same lack
lack of results.
Fred K
------------------
I have a program that determines how many numbers in an array
begins with a given number, however, if the number ends in zero
I want to exceed it. The part of the program that does this is
as follow:
a$ = (the desired number)
FOR i = 1 TO n
IF LEFT$(n$(i), 1) = a$ THEN
a = a + 1
IF RIGHT$(n$(i), 1) = "0" THEN b = b + 1
END IF
NEXT
Later I subtract b from a to obtain the number that are accept-
able. In some test data "a" was correct but the one number that
ended in a zero the program failed to pickup.
I tried the following one line:
IF LEFT$(n$(i), 1) = a$ AND RIGHT$(n$(i), 1) = "0" THEN b = b + 1
This one line had the same results or should I say the same lack
lack of results.
Fred K
------------------
Comment