Interesting... My guess is that if EDLINE is just 1 char, then LEN EDLINE - 2 is becoming 65535 (-1 as UInteger). 65535 which means However, after further investigation, this code (note, you can use [code] ... [/code] for code sections in the forum):
This code should print
it prints:
instead. Will look into this, thanks!
Code:
DIM EDLINE As String
LET EDLINE$ = "X"
X = EDLINE( TO LEN EDLINE -2)
PRINT "'";EDLINE;"' '";X;"'"
PRINT X = ""
PRINT LEN X = 0
This code should print
Code:
65535
'1' ''
1
1
it prints:
Code:
65535
'1' ''
0
1
instead. Will look into this, thanks!