Board index » delphi » Re: list index out of bounds?

Re: list index out of bounds?


2007-09-07 04:05:01 AM
delphi214
Nope, you didn't ask anyone to help solve it. All responses were voluntary.
There is no need to apologise. It seems that you are under a lot of
pressure, or worse.
"Donald Shimoda" <XXXX@XXXXX.COM>writes
Quote

Sorry, i never post that message to make sombody trying to help me. I
already solve in the hard way, like many times is needed with delphi 2007
(by example i cannot use MSBUILD and must disbale it).

Then, i just think all that people is commenting just for fun, sorry by my
mistake.

As i remember never ask for solving that, or yes?

Best regards.
 
 

Re: list index out of bounds?

"Rudy Velthuis [TeamB]"
Quote
IOW, range checking should ALWAYS be turned on.
Not ALWAYS, you only need it at developement stage. Otherwise, performance
loss can be very noticable in tight loops. For example if you're doing image
processing the {$R+} can be a performance killer.
 

Re: list index out of bounds?

Farshad writes:
Quote

"Rudy Velthuis [TeamB]"
>IOW, range checking should ALWAYS be turned on.

Not ALWAYS, you only need it at developement stage. Otherwise,
performance loss can be very noticable in tight loops.
Only in very tight loops. So turn it off for those loops only, and only
if you have proof it is necessary.
But it should generally be on in production code, too. It is better to
have a program stop with an error message than to have it simply go on
and produce bad results, which might go unnoticed.
--
Rudy Velthuis [TeamB]
"This isn't right, this isn't even wrong."
-- Wolfgang Pauli (1900-1958), upon reading a young physicist's
paper
 

Re: list index out of bounds?

Rudy Velthuis [TeamB] writes:
<snip>
Quote

IOW, range checking should ALWAYS be turned on.
No, it shouldn't be always turned on
-especially for certain applications where the range checking gets in the way.
Enough said.
 

Re: list index out of bounds?

Donald Shimoda writes:
Quote
>No, and I doubt it has anything to do with Update 2.

And how can you be sure?
Since there were no changes to the Delphi compiler in Update 2.
Quote
as you can see, is a obvious bug
It's not obvious at all, since there's not enough information provided.
--
Dave Nottage [TeamB]
 

Re: list index out of bounds?

Don Strenczewilk writes:
Quote
But he said above that DescargarScript merely changes a property.
Right, that is what he says. Hard to tell whether it is the case without
seeing the code.
--
Dave Nottage [TeamB]
 

Re: list index out of bounds?

Donald Shimoda wrote
Quote
... as you can see, is a obvious bug in the compiler, ...
If your problem is a bug; It is *not* obvious to me!
Further, if your problem happened to me, I am sure
that I could easily track it down using some of the
suggestions offered in this thread. --JohnH
 

Re: list index out of bounds?

Donald Shimoda wrote
Quote
... as you can see, is a obvious bug in the compiler, ...
If your problem is a compiler bug; it is *not*
obvious to me! Further, if your problem happened
to me, I am sure that I could easily track it
down using some of the suggestions offered in
this thread. --JohnH
 

Re: list index out of bounds?

"Don Strenczewilk" <XXXX@XXXXX.COM>writes
Quote
Nope, you didn't ask anyone to help solve it. All responses were
voluntary. There is no need to apologise. It seems that you are under a
lot of pressure, or worse.
LOL.Actually dont, but thanks for worry about me. ;)
--
Donald Shimoda
blogs.remobjects.com/blogs/donald/
 

Re: list index out of bounds?

On Thu, 6 Sep 2007 09:32:47 +0200, "DelphiUser"
<XXXX@XXXXX.COM>writes:
Quote
This give also a nice index out of bounds error.
It would.
Quote

procedure TForm1.Button1Click(Sender: TObject);
var
i:cardinal;
_list:TStrings;
begin
_list:=TStringList.create;
try
for i:=0 to _list.count-1 do begin
0 - 1 = -1. Out of bounds for a cardinal.
Quote
showmessage(_list[i]);
end;
finally
_list.free;
end;
end;
 

Re: list index out of bounds?

Michael C. writes:
Quote
Rudy Velthuis [TeamB] writes:
<snip>
>
>IOW, range checking should ALWAYS be turned on.

No, it shouldn't be always turned on
Yes, it should.
-especially for certain applications where the range checking gets in
the way. Enough said.
Turning off range checks is not the way to make apps faster. Changing
the algorithms is much more effective.
BTW, do you have an example when range checks get in the way?
--
Rudy Velthuis [TeamB]
"Never raise your hands to your kids. It leaves your
groin unprotected." -- Red Button
 

Re: list index out of bounds?

Donald Shimoda writes:
Quote
"Donald Shimoda" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>I dontknow, maybe is too late but that code dont must work?

My apologize to the comunnity. Another thread destroy some components
at the same time that part of code running.
OMG! Threads should not be allowed to do that.
--
Rudy Velthuis [TeamB]
"A good pun is its own reword."
 

Re: list index out of bounds?

Do you you mean Threads that destroy components or Threads in non-tech that
contain apologies?
"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes
Quote

OMG! Threads should not be allowed to do that.
 

Re: list index out of bounds?

Don Strenczewilk writes:
Quote
Do you you mean Threads that destroy components or Threads in
non-tech that contain apologies?
LOL! I meant the ones that destroy components, especially if they do it
behind the back of the main thread.
--
Rudy Velthuis [TeamB]
"Premature optimization is the root of all evil." -- Donald Knuth
 

Re: list index out of bounds?

"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes
Quote
Donald Shimoda writes:

OMG! Threads should not be allowed to do that.
Programers working too late is the cause, please dont make thread guilty for
that. <g>
--
Donald Shimoda
blogs.remobjects.com/blogs/donald/