Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.149 Beiträge
 
Delphi 12 Athens
 
#11

AW: Re: How to reverse array of any type?

  Alt 3. Dez 2012, 03:47
I submitted an expansion proposal at Embarcadero.
http://qc.embarcadero.com/wc/qcmain.aspx?d=110391
You may like to vote for it, so it will soon be integrated.
For all Delphi versions from 2009, you can upgrade this as a class helper.

Otherwise, these methods can of course also copy out and use directly.
Zitat:
procedure SwapArrayElements(aStartElement: Pointer; aElementSize, aElementCount: Integer);
Or you get the necessary information about the RTTI/TypeInfo.
Delphi-Quellcode:
procedure SwapArrayElements(var TheArray; ArrTypeInfo: Pointer);

var MyArr: array of ...;
SwapArrayElements(MyArr, TypeInfo(MyArr));
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat