Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: daten verändern auf die pointer zeigt?
12. Dez 2009, 23:59
Hi,
Delphi-Quellcode:
procedure Test(p: Pointer);
begin
PSingle(p)^ := 54.23; // 1. Single
PSingle(Cardinal(p) + SizeOf(Single))^ := 12.23; // 2. Single
inc(PSingle(p),2); // Nächstes Paar
PSingle(p)^ := 54.8; // 3. Single
PSingle(Cardinal(p) + SizeOf(Single))^ := 2.8; // 4. Single
end;
Das sollte dir helfen
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|
|
Zitat
|