Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: perldoc -f pack #534

Closed
p5pRT opened this issue Sep 20, 1999 · 2 comments
Closed

BUG: perldoc -f pack #534

p5pRT opened this issue Sep 20, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 20, 1999

Migrated from rt.perl.org#1381 (status was 'resolved')

Searchable as RT1381$

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 1999

From The RT System itself

perl documentation (5.005_61, but not in 5.004_02 and 5.005_02) contains
misprint.
It says​:
...............
  * The integer formats `"s"', `"S"', `"i"', `"I"', `"l"',
  and `"L"' are inherently non-portable between processors
  and operating systems because they obey the native
  byteorder and endianness. For example a 4-byte integer
  0x87654321 (2271560481 decimal) be ordered natively
  (arranged in and handled by the CPU registers) into
  bytes as

  0x12 0x34 0x56 0x78 # little-endian
  0x78 0x56 0x34 0x12 # big-endian
...............

The number 0x87654321is incorrect, it should be 0x78563412,
because single machine byte chunks are not considered to be swapped.
(no architecture makes transofmation of 0x87<=>0x78 [decimal​:135<=>120])

If I misunderstand the point then function explanation should be clearer :)

Good luck,
Vadim

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

@rgs - Status changed from 'stalled' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant