Trouble with Delphi if statements
Posted by Mandy on March 06, 2005
I apologise in advance for posting what is probably a very easy question but it has been driving me crazy so here goes...
Below is a simplified version of some code I wrote, but it seems that if the if statement is true (in this case col=2) then it executes the following statements (x=, y=) but doesn't execute the first "end" that should be associated with the "if then begin" and instead jumps to the second "end", displacing everything so that the "end" of the "row" for-loop ends up being the overall program end ("end.") So what's wrong with my syntax?
for row:=1 to numrow do
for col:=1 to numcol do
if col=2 then
Related Articles and Replies
[ Delphi Tutorials -- by DelphiLand ]