|The signs of literals firstname.lastname@example.org (Hung-Ta Lin) (1997-12-07)|
|Re: The signs of literals email@example.com (David L Moore) (1997-12-10)|
|Re: The signs of literals firstname.lastname@example.org (Chris Clark USG) (1997-12-10)|
|Re: The signs of literals email@example.com (1997-12-12)|
|Re: The signs of literals tim@wagner.Princeton.EDU (1997-12-12)|
|Re: The signs of literals firstname.lastname@example.org (Matt Timmermans) (1997-12-12)|
|Re: The signs of literals email@example.com (David L Moore) (1997-12-13)|
|From:||firstname.lastname@example.org (Henry Baker)|
|Date:||12 Dec 1997 14:45:04 -0500|
David L Moore <email@example.com> wrote:
> Second, it would be incorrect to treat a negative number as a positive
> number with a unary minus preceding it because, if your machine is
> two's compliment, you can now not represent the largest negative
> integer (eg -32768 in 16 bit) as a constant.
The solution to this problem is well-known and trivial. You _always_
build up integers using _negative_ arithmetic, as in `n:=10*n-d'.
You then convert to positive at the last moment _unless_ you see a
There was an article about this issue in Sigplan Notices around 1980
Return to the
Search the comp.compilers archives again.