Re: integer or long overflow...

From: Phil Staite (phil_at_nospam.com)
Date: 03/05/05


Date: Fri, 04 Mar 2005 19:04:24 -0700
To: deancoo <s2cuts555@yahoo.ca>

deancoo wrote:
> When you increase the number contained within an integer or long data type
> beyond its capacity, what happens? I've run into this situation, and it
> continues right along. Is it simply just rolling over when it gets to its
> limit? Curious.

I believe/suspect that like so many "edge effects" in C++ it is left
undefined. However, a 2's compliment architecture (as most C++
environments seem to be) will simply keep right on going - no
exception/trap as from say dedicated floating point hardware
experiencing a problem or say dividing by zero.

The gotcha with 2's compliment is that if you increase a signed integer
type (int or long) beyond it's limit, it becomes a very large negative
number and keeps "increasing" - becoming less negative, headed towards zero.



Relevant Pages

  • Re: Divide by Zero when it should not.
    ... values to Double data type. ... to change the data types within the query. ... I have a query that return a "Division by Zero" error ... I get the division by zero error then the query stay in design mode, ...
    (microsoft.public.access.queries)
  • Re: Leading zeros in number fields
    ... you need to switch the data type to text. ... changing it to General Number and niether allows a leading zero. ... other format options seem to make sense for this. ...
    (microsoft.public.access.gettingstarted)
  • Re: REPORT; If Null return "0"
    ... FROM ALLTasksFilter LEFT JOIN ON ... instance, Nzwould report any null values as zero. ... putting this inside your sum function, you are converting the nulls to ... so long as your specified value matches the data type of ...
    (comp.databases.ms-access)
  • Re: On to Bulk Insert issues
    ... carefully specifying the data type of the input file columns. ... All the nulls in that column are ... For this column, zero carries a very ... different meaning from null. ...
    (comp.databases.ms-sqlserver)
  • Re: Number Data Type Field and Leading Zeros
    ... Can't be done with a number formatted field. ... Your other programs will need to do the conversion. ... Access drops the leading zero automatically. ... > the field to be a number data type. ...
    (microsoft.public.access.tablesdbdesign)