PDA

View Full Version : Is this a bug?



efilnikufecin
01-31-2007, 06:43 PM
record my_rec
{
int a;
int b;
int c;
};
int a = 10;
int b = 250;
int c = a / b;
my_rec test;
test.a = 10;
test.b = 250;
test.c = test.a / test.b;
print(c);
print(test.c);

version 10.1 (maybe earlier) through 10.4 Output:

0
0.04

It appears that an integer in a record is handled as a float.

Expected output:

0
0

holatuwol
01-31-2007, 08:16 PM
It appears so. Fixed.

efilnikufecin
02-01-2007, 12:30 AM
Thanks Holatuwol, I just couldn't decide if that was intended or not...even though I could see no reason for it to be.