I’m working on writing a simple macro using BASIC language, MOD and Variables and I can’t seem to get the right answer.
–What works–‘print 3 MOD 1.5’–it prints 0 as you would expect.
'I get and the wrong answer with–;
DIM n as single;
DIM n2 as single;
n = 3;
n2 = 1.5;
print n MOD n2 '–it yields 1;
Can anyone please explain what I am doing wrong?
I have printed the individual variables so I know they are set correctly. (I’ve literally worked on this for hours.)
Also I’ve tried the variables as variant type. That still yields 1.
Version: 6.1.5.2
Build ID: 1:6.1.5-3+deb10u6
I’m using writer to open the Macro Editor. I can’t imagine that mattering.