Code: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str1
1->A
ClrHome
Repeat G=105
Output(1,1,sub(Str1,A,1
Repeat G=105 or G=24 or G=26
getKey->G
End
If G=24 and A>1
A-1->A
If G=26 and A<length(Str1
A+1->A
End
sub(Str1,A,1
Disp Ans
The selected character is returned as a one-character string in Ans.
Variable A keeps track of which character in the string is being selected.
Left and right arrow keys (getKey is 24 for left and 26 for right) allow A to change withing the range of 1 to the length of Str1.
The selected character is shown on screen.
Pressing Enter (getKey is 105) exits the loop, and the selected character is put into Ans and displayed.
---------Edit------------
Two bytes shorter, doesn't use G, but Str1 is limited to less than 105 characters long:
Code: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str1
1->A
ClrHome
Repeat Ans=105
Output(1,1,sub(Str1,A,1
Repeat max(Ans={105,24,26
getKey
End
If Ans!=105
A-(Ans=24 and A>1)+(Ans=26 and A<length(Str1->A
End
sub(Str1,A,1
Disp Ans
-----------Edit 2-------------------
Uses no Variables, just returns Ans. 3 bytes larger than original, but no limits on length of Str1.
Code: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str1
1
ClrHome
Repeat 105=imag(Ans
Output(1,1,sub(Str1,real(Ans),1
real(Ans)+[i]getKey
[i]imag(Ans)+real(Ans)-(imag(Ans)=24 and real(Ans)>1)+(imag(Ans)=26 and real(Ans)<length(Str1
End
sub(Str1,real(Ans),1
Disp Ans
-----------Edit 3-------------------
Shaved off 11 bytes. This is the smallest version, and still does not modify any variables.
Code: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str1
1
ClrHome
Repeat 105=imag(Ans
Output(1,1,sub(Str1,real(Ans),1
[i]getKey+real(Ans)-(imag(Ans)=24 and real(Ans)>1)+(imag(Ans)=26 and real(Ans)<length(Str1
End
sub(Str1,real(Ans),1
Disp Ans