robvonk wrote:I tried the 'Ans = SSUB(1234567890.12,1234567890.2)' code in a routine and it gives back 0.08 correctly.
Are you trying to put it into an integer?
The results are confusing...
My test routine is:
Code: Select all
Ans = Arg1-Arg2:' ':SSUB(Arg1,Arg2):' ':SDIV(SSUB(SDIV(Arg1,1,2),SDIV(Arg2,1,2)),1,2):' ':TRIM(Arg1,' ','B')
PRINT -1*Arg1
PRINT SMUL(-1,Arg1)
if SDIV(SSUB(Arg1,Arg2),1,2) < 0
THEN
PRINT '1'
END
ELSE
PRINT '2'
END
if SDIV(SSUB(Arg1,Arg2),1,2) = 0
THEN
PRINT '3'
END
ELSE
PRINT '4'
END
The results are like
this
I hope one can notice the difference...
Also, let me correct my statement too...
Earlier I wrote:
Code: Select all
i,e SSUB is returning a 0 when the difference is less than -0.1
Actually,
Code: Select all
i,e SSUB is returning a 0 when the difference is [b]more[/b] than -0.1
Just got confused by the negative signs,
, sorry!
Share to Learn, and Learn to Share.