home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!fi.gs.com!homer!wibble!davidp
- From: davidp@jeeves.gs.com (David Pattarini, London)
- Subject: Converting PC longs to Sun longs
- Message-ID: <C1H8Mx.CHJ@fi.gs.com>
- Sender: news@fi.gs.com
- Nntp-Posting-Host: wibble
- Reply-To: davidp@jeeves.gs.com
- Organization: Goldman, Sachs and Co
- Date: Tue, 26 Jan 1993 19:54:33 GMT
- Lines: 53
-
- I need to convert long integers written by a
- PC into Sun longs. If the PC long has a layout
- like:
-
- byte1 byte2 byte3 byte4
-
-
- I need to convert this to
-
- byte4 byte3 byte2 byte1
-
- on the Sun.
-
- After messing around with pack and unpack I don't seem to be having too
- much luck. Any help would be much appreciated.
-
- Thanks
-
- David
-
- ---
-
- +---------------------------------------------------------------+
- | |
- | David Pattarini |
- | Goldman Sachs International Ltd. |
- | London. Tel: [071] 774 2406 Email: davidp@jeeves.gs.com |
- | |
- +---------------------------------------------------------------+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-