| Posted: 09:17am 05 Jun 2018 |
Copy link to clipboard |
 Print this post |
|
The problem concerns the MM-plus V5.04.04 - V5.04.09 BETA 19, as well as MZ V5.04.14! Please try the following:
The mistake is not the temperature value, which is correct, but the array (the_ARR (2,2)) is overwritten!
option explicit option default integer dim the_Arr(3,8) dim float mt the_Arr(2,2) = 55
do the_Arr(2,2) = 55 'tempr start 42 print "STA "the_Arr(2,2) pause 2000 'mt = tempr(42) print "END "the_Arr(2,2) loop
OUTPUT:
STA 55 END 55 STA 55 END 55 . . .
. . . uncomment the "tempr" commands
option explicit option default integer dim the_Arr(3,8) dim float mt the_Arr(2,2) = 55
do the_Arr(2,2) = 55 tempr start 42 print "STA "the_Arr(2,2) pause 2000 mt = tempr(42) print "END "the_Arr(2,2) loop
OUTPUT:
STA 1254003 END 0 STA 1256003 END 0 STA 1258003 END 0 STA 1260003 . . .
The value that is erroneously written into the array is the TIMER-Value + 2000! (PAUSE 2000)
I can only reproduce the error with this array dimension (3, x) and only on index (2, x)!
The error does not occur with the MM170 with V5.04.08!
Thank you and best regards from Austria !
WolfgangEdited by PicFan 2018-06-08 |