Autor Beitrag
Fred Ferkel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 87



BeitragVerfasst: Di 03.06.03 13:10 
hi

da wären wir acuh schon bei der sache :)
die hi-funktion ist nämlich leider nur für 16bit integer werte..
ich suche eine standard-funktion die integer+int 64+extended in einzelne bytes zerlegt
falls die nicht verfügbar ist werd ich wohl mit XOR AND OR etc. arbeiten müssen...

mfg Sven

ps: das müsste auch rückwärts gehen
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 03.06.03 13:27 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  i: Integer; { kannst aber auch Int64 Extended whatever nehmen... }
  szBytes: array of Byte;
begin
  i := 123456;
  SetLength(szBytes, SizeOf(i));
  Move(i, szBytes[1]);
end;

Bin mir jetzt über die Parameterreihenfolge von Move nicht ganz sicher (und hab jetzt auch keine OH zum nachschaun). Entweder:
ausblenden Delphi-Quelltext
1:
Move(i, szBytes[1]);					

oder aber
ausblenden Delphi-Quelltext
1:
Move(szBytes[1], i);					

Aber du kannst ja selber nachschaun.. i ist der Source, szBytes[1] ist Destination...

Und zurück gehts einfach mit umgekehrten Parametern...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Fred Ferkel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 87



BeitragVerfasst: Di 03.06.03 13:32 
wunderbar!!
vielen dank

procedure Move(const Source; var Dest; Count: Integer);