• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Increment integer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Increment integer


  • Subject: Increment integer
  • From: Eivind Andersen <email@hidden>
  • Date: Fri, 24 Oct 2003 19:53:34 +0200

Hi,

I try to run the following:

Int number = 0;

number ++;

or

number = number + 1;

but the value of the variable increases with 4 (!)

how can that be?

I've set breakpoints before and after the increment is run, and the value goes from 0 to 4 then.

How do you increment an integer?


Eivind Andersen
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Increment integer
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: unconnected TextFields
  • Next by Date: Icon Suites
  • Previous by thread: NSBeginAlertSheet() in selectionShouldChangeInTableView:
  • Next by thread: Re: Increment integer
  • Index(es):
    • Date
    • Thread