PDA

View Full Version : QWord bug?



Christian Knudsen
26-09-2011, 09:11 AM
I'm using fpc version 2.4.4 on Windows XP 32-bit.

When run, this small piece of code produces exitcode=215:



PROGRAM test;

VAR x : byte;
y : qword;

BEGIN
x := 3;
y := x * 1000000000;
END.


However, this doesn't:



PROGRAM test;

VAR x : byte;
y : qword;

BEGIN
x := 2;
y := x * 1000000000;
END.


Nor this:



PROGRAM test;

VAR y : qword;

BEGIN
y := 3 * 1000000000;
END.


And neither does this (the number x is multiplied by is increased by a factor 10):



PROGRAM test;

VAR x : byte;
y : qword;

BEGIN
x := 3;
y := x * 10000000000;
END.


What on earth is going on?

Christian Knudsen
26-09-2011, 09:43 AM
Never mind. I'm an idiot. :s