Thread Große Integer in einzelne Bytes auflösen (13 answers)
Opened by zuse1 at 2019-02-15 11:50

rosti
 2019-02-15 13:20
#189786 #189786
User since
2011-03-19
3193 Artikel
BenutzerIn
[Homepage]
user image
pack/unpack natürlich, steht alles in der Doku.

Quote
Ich habe eine große Integerzahl, z.B.


Die Bytelänge musst Du wissen! 0x31fff sind auf jeden Fall mehr als 16 Bit, also 32. LE heißt Vax-Schablone nehmen:

Code (perl): (dl )
1
2
local $, = " ";
print unpack "C*", pack "V", 0x31fff; # 255 31 3 0


32 Bit sind 4 Bytes.


MFG

PS: In C: http://rolfrost.de/gcc.html


.
Last edited: 2019-02-15 13:25:14 +0100 (CET)

View full thread Große Integer in einzelne Bytes auflösen