Re: signed & unsigned numbers...

From: Sven Pran (no.direct_at_mail.please)
Date: 04/13/04

  • Next message: Gary Williams: "Re: Comparing two doubles"
    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


  • Next message: Gary Williams: "Re: Comparing two doubles"

    Relevant Pages

    • Re: Instr()
      ... Picking a few nits today aren't you, Michael. ... Try turning off your computer and writing a machine code routine with a pencil and a little notebook in such a way that the numbers you come up with will work and perform your desired task if you dump them straight into memory and point the processor at them and you'll see a very big difference between machine code and Assembler. ...
      (microsoft.public.vb.general.discussion)
    • Re: Instr()
      ... Picking a few nits today aren't you, Michael. ... interpret API (Application Program Interface) as relating to a set of ... Try turning off your computer and writing a machine code ... big difference between machine code and Assembler. ...
      (microsoft.public.vb.general.discussion)

    Loading