View Full Version : New edited lines are not recognized by compiler

11-07-2004, 06:17 PM
Hi guys

I've discovered a very silly phenomenon in the delphi environment: Sometimes (and unfortunately I don't know why sometimes and sometimes not) when I want to run a project I just edited, new lines are not considered by the compiler just as they would be not there.
There are also missing these blue points left of the code ( in Delphi 6). Any explanations for that? And may be an idea how I can change that? It can become very stupid if you cannot edit your code....


11-07-2004, 11:37 PM
Seems like compiler is optimized out your code. Check it: compiler can decide that your is "never reached" based on some condition.
For example:
if False then
Inc(i); // This code will never be executed, and no "blue dots" should appear here

12-07-2004, 12:34 AM
Hi Clootie

Well, looks like the compiler is a bit too engaged in that case because the ignored code should be executed, I can see no reason why it shouldn't...
Is there a possibility to switch this "feature" off?


12-07-2004, 09:23 AM
Well, to me it seems you should dig for your problem in your code. But optimizations can be turned off in Options dialog under Compiler tab.

13-07-2004, 08:35 AM
Post the block of code that includes the section being ignored and then we can possibly try work out why its happening.

What irritates me on a related subject is if you make a copy of all the files in a directory including a project file. When you open the copied project file it still points to the units and forms in the original directory!