![]() |
Error: LET string1 = string1 ( 1 TO LEN string1) (solved) - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://forum.boriel.com/forumdisplay.php?fid=15) +---- Thread: Error: LET string1 = string1 ( 1 TO LEN string1) (solved) (/showthread.php?tid=2558) |
Error: LET string1 = string1 ( 1 TO LEN string1) (solved) - zarsoft - 2024-08-14 In my program I had DIM EDLINE AS STRING ' global variable and if I wrote EDLINE = EDLINE( TO LEN EDLINE-2) then the test EDLINE = "" it didn't always work and I had to use LEN EDLINE = 0 Then I changed it to aux = EDLINE( TO LEN EDLINE-2) EDLINE = aux and the test EDLINE = "" worked well. RE: Error: LET string1 = string1 ( 1 TO LEN string1) - boriel - 2024-08-15 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): Code: DIM EDLINE As String This code should print Code: 65535 it prints: Code: 65535 instead. Will look into this, thanks! RE: Error: LET string1 = string1 ( 1 TO LEN string1) - boriel - 2024-08-15 Okay, try this beta, and plz. let me know if it works ok: ![]() http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta15.tar.gz http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta15.zip http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta15-win32.zip http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta15-linux64.tar.gz http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta15-macos.tar.gz RE: Error: LET string1 = string1 ( 1 TO LEN string1) - zarsoft - 2024-08-15 Works Thanks |