Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!bloom-beacon!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: Casting Integer to SignedByte in THINK Pascal Message-ID: <2806@husc6.harvard.edu> Date: 9 Oct 89 19:52:35 GMT References: <5728@tank.uchicago.edu> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Distribution: na Organization: Symantec Language Products Group Lines: 34 In article <5728@tank.uchicago.edu> gft_robert@gsbacd.uchicago.edu writes: > >I want to write out an integer to a specific location in memory, something like >this: > If you want to write out two bytes, then var p : ^Integer; p := Pointer(addr); p^ := i; is the way to do it. They way you wrote it, the high byte of your value will get written out; there will be no range violation, because the high byte will never have a value bigger than $FF. At any rate, SignedByte is not 0..255, it's -127..128, or $ff..$80. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "There is no personal problem which cannot be solved by sufficient application of high explosives." ~~~~~~~~~~~~~~~