Forum > Designer
wrong condition check in while and for loops
(1/1)
svd71:
Hallo all,
I am not sure, is it one mistake of Lazarus or fpc.
You can see it at the attached picture. Variables i and j have values 0 and condition "(i < j)" is a false. But any way, jump the debugger in the loop.
With 'for'-loop have same mistake. But only is first value of the variable 'i' as 40.
About the Lasarus:
Version 3.2
FPC 3.2.2
FREE_UNKNOWN_REVISION
X86-64-win64-win32/win64
The project have default values for OS, CPU and etc.
BR.
Zvoni:
--- Quote ---I am not sure, is it one mistake of Lazarus or fpc.
--- End quote ---
In 99.99999% cases it's the user.....
--- 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";}};} ---while i < j do;... Spot the mistake....
TRon:
I was so distracted by all the highlighted lines, colors, selected text, underlined graphics, arrows and text that I completely overlooked that.
Nice catch Zvoni.
Navigation
[0] Message Index