home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16777 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  588 b 

  1. Path: sparky!uunet!olivea!spool.mu.edu!umn.edu!csus.edu!ucdavis!othello.ucdavis.edu!fzjaffe
  2. From: fzjaffe@othello.ucdavis.edu (Rory Jaffe)
  3. Newsgroups: comp.lang.c
  4. Subject: converting unsigned int to signed int
  5. Message-ID: <19226@ucdavis.ucdavis.edu>
  6. Date: 14 Nov 92 22:37:47 GMT
  7. Sender: usenet@ucdavis.ucdavis.edu
  8. Organization: University of California, Davis
  9. Lines: 4
  10.  
  11. What is a safe, portable method of converting from signed int to
  12. unsigned?  I want the most negative signed value to convert to 0, and
  13. the most positive signed value to (max signed int) + abs(max negative
  14. signed int).
  15.