Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Is the documentation ... correct (the name of the rose)

by Anonymous Monk
on Jul 07, 2015 at 20:57 UTC ( [id://1133629]=note: print w/replies, xml ) Need Help??


in reply to Is the documentation for Perl 5.20 'pack' correct?

Adding to RichardK above: the byteorder string is not an integer value (hex or otherwise), it just gives the memory layout.

Interesting that human thinking seems to be inherently little-endian itself — the "1" for "first" corresponds with the least significant byte. Or more likely, it acknowledges the ranking or integer types: small values are a subset of bigger integers' values, so each larger type extends the range. In this sense, the extra bytes are additional hence enumerated in that order. But enough with Semiotics.

Glibc headers for example come with the following definitions in /usr/include/endian.h:

#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN    4321
#define __PDP_ENDIAN    3412
... which allows for convenient testing a la #if __BYTE_ORDER == __LITTLE_ENDIAN; clearly this convention is not a perl quirk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1133629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found