Code: Select all
dim as integer x = -10
?x mod 3 ' -1
if x<0then?x
sleep
And about "then", No separator is fine, It's not an operator like "<,>,etc"
Thanks
Code: Select all
dim as integer x = -10
?x mod 3 ' -1
if x<0then?x
sleep
Code: Select all
#define dmod(x,y) (y)*Frac((x)/(y))
print -10 mod 3
print dmod(-10,3)
print dmod(-10.5,3)
'integer test
dim as long g
for z as long=1 to 1000000
var m=int(rnd*2000-rnd*2000)
var n=int(rnd*2000-rnd*2000)
if n<>0 then
g=dmod(m,n)
if m mod n <> g then
print m mod n,g
end if
end if
next
print "done"
sleep
You're right, it's not seriousdodicat wrote: The Then keyword should be separated by a space.
You got away with it by enclosing it with a literal and a question mark.
Probably a bug of sorts, but not worth fixing. (same as end if endif)