Author: Kolss
Date: 07:44:58 11/05/04
Go up one level in this thread
On November 05, 2004 at 10:42:25, Kolss wrote:
>On November 05, 2004 at 10:19:44, Andrey Popov wrote:
>
>>>>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 just as
>>>well - it works for me at least...
>>>
>>>Best regards - Munjong.
>>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;
I did not use this, but left the standard "uses SysUtils" in.
>>{$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.
>
>Hi,
>
>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[]:=4.0;", as it should be.
That was "... ar[i] ...", of course.
>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.
>
>Hope that helps!
>
>Best regards - Munjong.
M.
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.