|
Post by juppel on Jul 11, 2024 21:48:28 GMT 1
Hi I found a bug,
Bacon Version 4.9 'all Right
need$="test" PRINT RIGHT$(LEFT$(need$,2), LEN(need$)-1)
output: =>te
need$="test" PRINT RIGHT$(LEFT$(need$,2)), LEN(need$)-1) Ŵrong
But the compiler reports no errors Output: => e3
need$="test" PRINT RIGHT$(LEFT$(need$,2), LEN(need$)-1)) Ŵrong
But the compiler reports no errors
output: => te
|
|
|
Post by Pjot on Jul 12, 2024 7:29:53 GMT 1
Hi juppel, Thanks for your report! It seems are two issues here, however, there's a misunderstanding as well. This PRINT statement is correct: PRINT RIGHT$(LEFT$(need$, 2))
The LEFT$ and RIGHT$ functions do not require a second argument. If the second argument is omitted then it defaults to '1'. So in fact, the parenthesis error in the first case is the one at the end: need$="test" PRINT RIGHT$(LEFT$(need$,2)), LEN(need$)-1) Ŵrong
Then both your issue#1 and issue#2 come down to the situation that PRINT does not look at redundant characters at the end of an expression, which is a bit confusing. It is fixed in the latest beta. Best regards Peter
|
|