SRL Archive - Suggestions

Out Of Range error message improved?


bg5

2012-04-14 22:41:39

I spent a lot of time debuging arrays ,when this error occurs. Sometimes when I work on TPAs ,sometimes on bitmaps. To get known ,what happen I have to add few lines before line with array ,run script ,and wait for error. For example:

for a:=0 to 10 do
DoSomething(TPA[a]);

// and now with debug
for a:=0 to 10 do
begin
writeln(a);
writeln(high(TPA));
DoSomething(TPA[a]);
end;

I think it would be much simpler ,if required information were shown in debug box. So, is it possible to add something like that ? :

Error: Out Of Range at line 78 : index [7] doesn't exist