|
If I understand this correctly, you want to check for duplicate
characters anywhere in the string.
___JOHN_WAS_HERE_______ String being scanned
^______________________ Counter #1 - Start of current scan
^______________________ Counter #2 - Character being compared to #1
^______________________ Counter #3 - Last non-blank character
(at start)
_______________^_______ Counter #3 - After 1st pass
______________________^ End-Of-String (set to '23' at start)
_______________^_______ End-Of-String - After 1st pass
That being the case, you need to parse the string as follows:
Counter #1 - starting point of current scan
Counter #2 - Character you're comparing to
Counter #3 - Last non-blank character found in string
Let End-Of-String = length of string you're checking
Start at the left end of the string; Counter #1 points to the
beginning of the current scan.
LOOP:
If cell contents at Counter #1 = blank, increment and start over
(unless Counter #1 = End-Of-String).
Let Counter #2 increment from Counter #1 to End-Of-String.
For each value of #2, compare the contents of cell at #2 with
contents of cell at #1.
If you have a match, you have duplicate characters, and the
string fails the test.
As Counter #2 increments, if the contents of cell #2 not= blank,
Counter #3 = Counter #2.
At the end of the first pass through the string, Counter #3 points to
the last position where a non-blank character was keyed.
Let End-Of-String = Counter#3.
(This lets you scan only where the user keyed something).
Increment Counter #1
If Counter #1 < End-Of-String, GoTo LOOP
--Paul E Musselman
PaulMmn@ix.netcom.nospam.com
>Chuck asked (in part):
>
>3) testing for non-repetitive characters (i.e. maximum of x number of
>the same digits keyed...not necessarily consecutive) AND, x is based on
>HOW MANY characters were keyed within the 23 character string.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.