The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weirdness MK II
#1
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.

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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)