Forum > Windows

About DIV and ROUND

(1/1)

SaintMichael57:
Dear FreePascal Community:

Why am I getting the following error messages?

ROUND(Weight);  error: Illegal expression.

(Weight DIV 2) error: Operator not overloaded: "Real" div "shortint"

djzepi:
Check yours code!


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var  Weight:double;  w1,w2:integer; 
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---begin  // ...  w1 := round(Weight);  w2 := w1 div 2;end; 
See also
http://wiki.freepascal.org/Div
http://wiki.freepascal.org/Round
http://wiki.freepascal.org/Becomes
http://wiki.freepascal.org/Data_type

Navigation

[0] Message Index

Go to full version