Thread einzelne Bytes in Perl (19 answers)
Opened by campbell-bs at 2011-11-17 15:42

GwenDragon
 2011-11-18 11:46
#154295 #154295
User since
2005-01-17
14748 Artikel
Admin1
[Homepage]
user image
Quote
c A signed char (8-bit) value.
C An unsigned char (octet) value.
W An unsigned char value (can be greater than 255).

s A signed short (16-bit) value.
S An unsigned short value.

l A signed long (32-bit) value.
L An unsigned long value.

q A signed quad (64-bit) value.
Q An unsigned quad value.
(Quads are available only if your system supports 64-bit
integer values _and_ if Perl has been compiled to support those.
Raises an exception otherwise.)


Ich nehme an, die Zahlen bei den C-Typen müsste die Bitbreite (Anzahl ) sein?
Das Template bei
Code: (dl )
1
2
3
4
uint8t zahl1;
uint16_t zahl2;
int32_t zahl3;
uint8t zahl1;

für pack dürfte dann sein: CSlC.
Ungetestet.
Last edited: 2011-11-18 11:49:06 +0100 (CET)

View full thread einzelne Bytes in Perl