Re: signed & unsigned numbers...
From: Sven Pran (no.direct_at_mail.please)
Date: 04/13/04
- Previous message: Yoshi: "Re: Comparing two doubles"
- In reply to: John Herbster: "Re: signed & unsigned numbers..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Apr 2004 09:38:53 +0200
"John Herbster" <herb-sci1_AT_sbcglobal.net> wrote in message
news:407b1cec$1@newsgroups.borland.com...
>
> Sevn,
>
> My question was meant to be an answer written in the
> form of a rhetorical question for Michael. Thanks for
> adding to the answer.
>
> Myself, I would be interested in finding some authoritative
> explanation of how range and overflow checking (when
> enabled) is implemented in the run-time code by the
> compiler. I know that I could try looking at the emitted
> machine code, but if there is any more or less universal
> logic, I would appreciate knowing what it is.
>
> Regards, JohnH
At machine code level you have the carry and overflow flags
whihch depending upon the actual operation will signal such
conditions. In addition to that range checking implies adding
code to validate values (at critical points) before using them.
Something like: (pseudocode!)
if I < low() or I > high() then range check else process
regards Sven
- Previous message: Yoshi: "Re: Comparing two doubles"
- In reply to: John Herbster: "Re: signed & unsigned numbers..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|