|
Post by rikky on Apr 10, 2024 7:54:54 GMT 1
Hello, Somehow the bug from here reappeared, in some form. PRINT PRINT VERSION$
OPTION BASE 1
FUNCTION TESTARGS$(VAR bla$ SIZE size) LOCAL abc PRINT PRINT "size : ",size 'size = 3 FOR abc = 1 TO size PRINT "ARG[" & STR$(abc) & "] : " & bla$[abc] NEXT abc RETURN "" END FUNCTION
TESTARGS$("1","2","3") TESTARGS$("","2","3") TESTARGS$("1","","3") TESTARGS$("1","2","")
result: 4.8
size : 3 ARG[1] : 1 ARG[2] : 2 ARG[3] : 3
size : 3 ARG[1] : ARG[2] : ARG[3] :
size : 3 ARG[1] : 1 ARG[2] : ARG[3] :
size : 3 ARG[1] : 1 ARG[2] : 2 ARG[3] : Rik.
|
|
|
Post by Pjot on Apr 10, 2024 21:44:28 GMT 1
Hi rikky, Thanks for noticing, though the issue looks similar as to the previous bug, this case is a consequence of the new optimized string handling design in BaCon. From 4.8 and later, a string with the NULL value is regarded (internally) as a normal regular string, while previously this would have been an error. The fix was very easy, I have removed the NULL check for VAR (should not have been there in the first place). If you have time please verify if the latest tar.gz works for you. Best regards, Peter
|
|
|
Post by rikky on Apr 11, 2024 8:38:29 GMT 1
Yes, it works: 4.8.1
size : 3 ARG[1] : 1 ARG[2] : 2 ARG[3] : 3
size : 3 ARG[1] : ARG[2] : 2 ARG[3] : 3
size : 3 ARG[1] : 1 ARG[2] : ARG[3] : 3
size : 3 ARG[1] : 1 ARG[2] : 2 ARG[3] : Thanks. Rik.
|
|