KermMartian wrote:
Step 1: Formulate something that turns the sequence {76,66,56,46,36,26,75,...} into the sequence {1, 2, 3, 4...}. Take X as any given key value:
(1a) Notice that it's sets of 6, counting down from 6. int(.1X)) gives {7,6,5,4,3,2,7,...}. We want to count up, so let's try 7-int(.1X) to get {0,1,2,3,4,5,0,...}.
(1b) Now we need to use the ones digit. The first 6 are 6, the next 6 are 5, next 6 are 4, etc. First we need the digit itself, we'll use X-10int(.1X) to get it. This will give us {6,6,6,6,6,6,5,5,5,5,5,5...}.
(1c) We want {0,0,0,0,0,0,6,6,6,6,6,6,12,12,12,12...} as our offsets, so we'll do 6(6-(X-10int(.1X))) = 36-6X+60int(.1X).
(1d) Now we put {0..., 6...., 12,... } together with {0,1,2,3,4,5,0,1...} to get {0, 1, 2, 3, 4, 5, 6, 7, ... 25}:
7-int(.1X)+36-6X+60int(.1X)
(1e) Simplify! 43-6X+59int(.1X). And we need to offset from 1, not 0, so 44-6X+59int(.1X)
Step 2: Grab a letter!
Code:
Step 3: Put it all together!
Code:
Hopefully that makes sense!
(1a) Notice that it's sets of 6, counting down from 6. int(.1X)) gives {7,6,5,4,3,2,7,...}. We want to count up, so let's try 7-int(.1X) to get {0,1,2,3,4,5,0,...}.
(1b) Now we need to use the ones digit. The first 6 are 6, the next 6 are 5, next 6 are 4, etc. First we need the digit itself, we'll use X-10int(.1X) to get it. This will give us {6,6,6,6,6,6,5,5,5,5,5,5...}.
(1c) We want {0,0,0,0,0,0,6,6,6,6,6,6,12,12,12,12...} as our offsets, so we'll do 6(6-(X-10int(.1X))) = 36-6X+60int(.1X).
(1d) Now we put {0..., 6...., 12,... } together with {0,1,2,3,4,5,0,1...} to get {0, 1, 2, 3, 4, 5, 6, 7, ... 25}:
7-int(.1X)+36-6X+60int(.1X)
(1e) Simplify! 43-6X+59int(.1X). And we need to offset from 1, not 0, so 44-6X+59int(.1X)
Step 2: Grab a letter!
Code:
StrMid "ABCDEFGHIJKLMNOPQRSTUVWXYZ",44-6X+59int(.1X),1
Step 3: Put it all together!
Code:
3->Dim List 10
Locate 1,1,"___"
For X=1 TO 3
0->K
While K=0
Getkey->K
WhileEnd
K->List 10[X]
Locate X,1,StrMid "ABCDEFGHIJKLMNOPQRSTUVWXYZ",44-6X+59int(.1K),1
ForEnd
Hopefully that makes sense!
Surprisingly, I approve of the number of commas in this post.
Also, very well thought out and well-explained solution.