![]() |
Delphi-Version: 2010
Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
Hi, brauch mal wieder dringend Hilfe.
Ich muss von einem smallint Wert und von einem normalen integer Wert Big Endian und little Edian tauschen. Bitte um Hilfe von euch, danke :thumb::-D |
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
Delphi-Quellcode:
t1 := wert DIV 65536;
t2 := wert MOD 65536; nwert := t2 * 65536 + t1; |
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
Delphi-Quellcode:
uses
Sysutils; function SwapEndianSmallInt(Value: SmallInt): SmallInt; begin result := System.Swap(Value); end; function SwapEndianInteger(Value: Integer): Integer; begin LongRec(result).Lo := System.Swap(LongRec(Value).Hi); LongRec(result).Hi := System.Swap(LongRec(Value).Lo); end; |
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
|
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
Zitat:
|
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
Zitat:
Delphi-Quellcode:
function RB(A: longint): longint;
{-Umwandlung Big - Little Endian} begin RB := ((A and $FF) shl 24) or ((A and $FF00) shl 8) or ((A and $FF0000) shr 8) or ((A and longint($FF000000)) shr 24); end; |
AW: Big Endian Little Endian tauschen von smallint Wert und von normalem integer Wert
danke Leute hat wunderbar funktioniert
wie immer halt :thumb::thumb::-D |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:47 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz