Article View: comp.lang.postscript
Article #434converting binary to integers?
From: Jim Sloey (253-7956)
Date: Thu, 09 Apr 1992 14:42
Date: Thu, 09 Apr 1992 14:42
20 lines
1254 bytes
1254 bytes
Maybe this is really easy and I'm just not finding a reference somewhere, but I need to do some math operations on values read in with readhexstring and can't figure out how to turn them into integers, perform the math, then put the resulting integers in binary back into the string. example /mystr1 1 string def /mystr2 1 string def /mystr3 1 string def currentfile mystr1 readhexstring fe currentfile mystr2 readhexstring 01 % Now how do I add the binary value of mystr1 and mystr2, then put the % resulting value (255) into mystr3 ? Any help would be greatly appreciated. Thanks in advance... Jim Sloey; Eastman Kodak Company; Rochester, New York 14650-1925; phone-716.722.7291 fax-716.588.5771 page-716.975.0803. Email sloey@kodak.com or dda=id=eksmtp.sloey%kodak@mcimail.com eksmtp(sloey) or Country=US,ADMD=MCI,PRMD=KODAK,DDA=ID=eksmtp.sloey
Technical Details
Message-ID:
<1992Apr9.144239.28280@ssd.kodak.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!spdcc!dirtydog.ima.isc.com!ispd-newsserver!sloeyShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!spdcc!dirtydog.ima.isc.com!ispd-newsserver!sloey From: sloey@ssd.kodak.com (Jim Sloey (253-7956)) Subject: converting binary to integers? Message-ID: <1992Apr9.144239.28280@ssd.kodak.com> Originator: sloey@coop Sender: news@ssd.kodak.com Organization: Eastman Kodak Date: Thu, 9 Apr 92 14:42:39 GMT