Forum
bug on mod (*solved*) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: bug on mod (*solved*) (/showthread.php?tid=852)



bug on mod (*solved*) - nitrofurano - 09-29-2018

since few months ago i noticed some weird behaviour from mod operand

Code:
dim i as uinteger
cls
do
for i=0 to 65535
print at 9,9;chr$( 48+(i mod 10) )
print at 9,8;chr$( 48+(int(i/10) mod 10) )
print at 9,7;chr$( 48+(int(i/100) mod 10) )
print at 9,6;chr$( 48+(int(i/1000) mod 10) )
print at 9,5;chr$( 48+(int(i/10000) mod 10) )
next
loop

as happened months ago, it is supposed to display a number on screen ranging from 0 to 65535, but the result gets totally messy
(tested on version 1.8.5 now, the result is as messy as 1.6.12)


Re: bug on mod - boriel - 10-01-2018

Please, download version 1.8.8, and tell me.
Should be fixed.