Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[1281] Integer division?

3 replies · 1,324 views · Started 20 July 2010

ffc script Division
{
void run()
{
Trace(11/16);
}
}

0.0000

Not supposed to do that, I don't think...
0.11/0.16 is the same, if anyone's wondering.

Something dodgy's going on in the parser =(

Division
SETV d2,0
SETR d3,REFFFC
PUSHR d3
SETR d4,SP
PUSHR d4
SETV d2,11
PUSHR d2
SETV d2,0
PUSHR d2
GOTO 14
POP d4
SETV d3,0
QUIT
POP d3
TRACER d3
POP d3
GOTOR d3

Hey, it's not even trying to divide anything!

Nor does this work:


ffc script test
{
void run()
{
int r = 11/16;
}
}