Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.475 Beiträge
Delphi 12 Athens
|
AW: System.Generics.Collections.TArray.Copy
24. Nov 2014, 13:04
Ich finde, das ist richtig. Tatsächlich wirft er mir aber eine EArgumentOutOfRangeException
- Exception um die Ohren denn in
System.Generics.Collections.pas steht:
Delphi-Quellcode:
class procedure TArray.CheckArrays(Source, Destination: Pointer; SourceIndex, SourceLength, DestIndex, DestLength, Count: NativeInt);
begin
if (SourceIndex < 0) or (DestIndex < 0) or (SourceIndex >= SourceLength) or (DestIndex >= DestLength) or
(SourceIndex + Count >= SourceLength) or (DestIndex + Count >= DestLength) then
raise EArgumentOutOfRangeException.CreateRes(@SArgumentOutOfRange);
if Source = Destination then
raise EArgumentException.CreateRes(@sSameArrays);
end;
Das steht in meinem XE7 aber anders da:
Delphi-Quellcode:
class procedure TArray.CheckArrays(Source, Destination: Pointer; SourceIndex, SourceLength, DestIndex, DestLength, Count: NativeInt);
begin
if (SourceIndex < 0) or (DestIndex < 0) or (SourceIndex >= SourceLength) or (DestIndex >= DestLength) or
(SourceIndex + Count > SourceLength) or (DestIndex + Count > DestLength) then
raise EArgumentOutOfRangeException.CreateRes(@SArgumentOutOfRange);
if Source = Destination then
raise EArgumentException.CreateRes(@sSameArrays);
end;
|
|
Zitat
|