01-28-2010, 07:39 AM
I seem to be just posting stuff that baffles me. I might work it out, but here we go:
The code is actually sent "AA" as a string right here. It comes back as "nn" apparently. Which is odd.
The really weird thing is the result:
That screen corruption has me worried. But the results table implies that CHR$(110) comes out sometimes as "q" and sometimes as "n". I think.
Oh, incidentally, string slicing using string(i) doesn't work again. Have to use string(i TO i); otherwise it insists it's not an array and sulks.
However, string(3) [As a number, not a variable] seems to work just fine.
The code is actually sent "AA" as a string right here. It comes back as "nn" apparently. Which is odd.
Code:
CLS
FOR i=0 to 1 step 2: REM Just grab the first two temporarily. Change this for the whole input later!
LET leftChar = CODE characters$ (i to i)
LET rightChar = CODE characters$ (i+1 to i+1)
print leftChar, rightChar
print CHR$(leftChar), CHR$(rightChar)
print CHR$(110), CHR$(110)
next i
The really weird thing is the result:
Code:
110 110
q n
n n
And a line of corrupted screen a little further down.
That screen corruption has me worried. But the results table implies that CHR$(110) comes out sometimes as "q" and sometimes as "n". I think.
Oh, incidentally, string slicing using string(i) doesn't work again. Have to use string(i TO i); otherwise it insists it's not an array and sulks.
However, string(3) [As a number, not a variable] seems to work just fine.