Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Correction and supplementary comment...

Author: Andrey Popov

Date: 08:02:33 11/05/04

Go up one level in this thread


>>>>>In Turbo Pascal, if your program has crashed with run-time error,
>>>>>then the line in the source code where the error occured is highlighted.
>>>>>In Delphi I cannot learn where is the place of a run-time error.
>>>>
>>>>Well, if you set the respective compiler options (Menu Project -> Options ->
>>>>Compiler -> Runtime Errors and Debugging), you get to the exact line...
>>>
>>>I runned the following program. It crashed and Delphi closed the execution
>>>window immediately. I even could not see the error message in that window.
>>>No line was highlighted in the source window after that.
>>>program a;
>>>uses windows;
>>>{$APPTYPE CONSOLE}
>>>{$R+ D+ L+ Y+}
>>>{Options above are the same as in Runtime Errors and Debugging menus}
>>>var i:integer;
>>>    ar : array [1..3] of real;
>>>begin
>>>  i:=1;    ar[i]:=1.0;
>>>  inc(i);  ar[i]:=2.0;
>>>  inc(i);  ar[i]:=3.0;
>>>  inc(i);  ar[i]:=4.0;
>>>  writeln(i);
>>>end.
>>
>>I created a new console application (File -> New -> Other -> Console
>>Application), copied your code into the program, checked the compiler options,
>>pressed F9 to start, and the program was stopped with the error message "Range
>>Error" and highlighted the line "inc(i); ar[i]:=4.0;", as it should be.
>>If I do not check the options in the menu, I do not get to the line either. So
>>you should really check the compiler options in the menu, which means you can
>>get rid of the "{$R+ D+ L+ Y+}"... Seems it is not truly equivalent.

Thank you, but it did not help me. It seems that there is another option on
another place or it is a difference in Delphi versions.
Which version do you use?



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.