Thursday, October 30, 2008

Incompatible types: 'Integer' and 'Extended'

muncul pesan error seperti diatas ketika melakukan kondisi pembagian.

contoh :

var
value1, value2 , result : integer;

value1 := 2;
value2 := 3;
result := value1 / value2;


ketika aplikasi running maka kompilasi akan gagal dan muncul pesan error "Incompatible types: 'Integer' and 'Extended'"

seharusnya pada :
result := value1 / value2;



dirubah menjadi
result := value1 div value2;


No comments: