home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 8013 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.0 KB  |  66 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!fi.gs.com!homer!wibble!davidp
  3. From: davidp@jeeves.gs.com (David Pattarini, London)
  4. Subject: Converting PC longs to Sun longs
  5. Message-ID: <C1H8Mx.CHJ@fi.gs.com>
  6. Sender: news@fi.gs.com
  7. Nntp-Posting-Host: wibble
  8. Reply-To: davidp@jeeves.gs.com
  9. Organization: Goldman, Sachs and Co
  10. Date: Tue, 26 Jan 1993 19:54:33 GMT
  11. Lines: 53
  12.  
  13. I need to convert long integers written by a 
  14. PC into Sun longs. If the PC long has a layout
  15. like:
  16.  
  17.     byte1 byte2 byte3 byte4    
  18.  
  19.  
  20. I need to convert this to
  21.  
  22.     byte4 byte3 byte2 byte1
  23.  
  24. on the Sun. 
  25.  
  26. After messing around with pack and unpack I don't seem to be having too
  27. much luck. Any help would be much appreciated.
  28.  
  29. Thanks
  30.  
  31.     David
  32.  
  33. ---
  34.  
  35. +---------------------------------------------------------------+
  36. |                                |
  37. | David Pattarini                               |
  38. |   Goldman Sachs International Ltd.                      |
  39. |   London. Tel: [071] 774 2406  Email: davidp@jeeves.gs.com    |
  40. |                                |
  41. +---------------------------------------------------------------+
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.