|
Post by tsh73 on Apr 1, 2021 13:54:56 GMT -5
Then passing variable got with byRef furter with ByRef, strange thing happens.
Old Lb/JB
2.0 y= 2 10 2 single byRef Ok(?) y= 2 x= 1.7 10.1 1.7 passing futher byRef Ok(?)
LB5 352
5.0 y= 2 10 2 single byRef Ok(?) x= 0.7 0.1 0.7 passing futher byRef Ok(?) 1 this was non-stopping error 2 this was non-stopping error 3 this was non-stopping error 4 this was non-stopping error 5 this was non-stopping error
now, LB5 produces one line less (no second "y=") in IDE, code
test2=y*10 is highlighted after program finished and message visible in a statusbar
Message not understood #* So it looks like this is an error?
But obviously, execution goes along - results of second
print z, a is there, and I added printing loop - it just got executed. Is there some sort of "soft", non-breaking error in LB5?
'passing byRef argument further byRef 'LB5 produces one line less and error(?non-stopping error?)
print Version$ a=1 z=test2(a) 'single byRef print z, a print "single byRef Ok(?)"
a=1 z=test(a) 'further byRef print z, a print "passing futher byRef Ok(?)"
for i = 1 to 5 print i,"this was non-stopping error" next
function test(byRef x)
test = test2(x)+0.1 'this line works OK in LB4 'in LB5, ends with Message not understood #* in test2() x=x-0.3 'change var here print "x=",x end function
function test2(byRef y) test2=y*10 'LB5 errors here 'Message not understood #* y=y+1 'change var here print "y=",y end function
|
|
|
Post by Carl Gundel on May 24, 2021 16:29:17 GMT -5
Turns out there are at least two bugs here. Fixed one, and working on the second.
|
|
|
Post by Carl Gundel on May 24, 2021 21:37:20 GMT -5
Turns out there are at least two bugs here. Fixed one, and working on the second. Okay, the second byref bug is now also fixed. The output is now identical between v4.5.1 and v5.0 (except for the first line which is the version number).
|
|