|
Post by rikky on Sept 13, 2023 16:03:09 GMT 1
Hello. I'm running BaCon version 4.7 on Linux armv7l, and I encountered what seems to me a bug. Since I tend to forget a lot, I like to make remarks in the form of: programline : ' remark So here is my program: string$ = "blablabla"
string$ = REPLACE$(string$,"bla","bla" & "bla") : 'compiles string$ = "bla" & REPLACE$(string$,"bla","blabla") : 'also compiles string$ = "bla" & REPLACE$(string$,"bla","bla" & "bla") : 'does not compile And here is my other program: Q$ = CHR$(34) : ' quote BS$ = CHR$(92) : ' backslash SQ$ = CHR$(39) : ' singlequote
string$ = "bla" & REPLACE$(string$,Q$,Q$ & SQ$ & Q$ & SQ$ & Q$) : 'does not compile Rik.
|
|
|
Post by Pjot on Sept 13, 2023 16:53:24 GMT 1
Hi Rik, Well spotted - you are right, this does not work. And it has never worked. Parts in a line separated by a colon symbol ':' were sent straight to the statement parser. You example clearly shows that such part by itself needs tokenization first. Miraculously, it seems to be fixed by simply passing the part of code to the current tokenize function (recursion). With this fix, I was able to compile your examples. You can download the latest tarball with the fix here. Thanks for reporting, Best regards Peter
|
|