• 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
Re: Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Number


  • Subject: Re: Number
  • From: David LeBer <email@hidden>
  • Date: Tue, 21 Feb 2006 10:42:53 -0500


On 21-Feb-06, at 5:08 AM, Jim Wong wrote:

Hi:

In java and C++, there's the ++, += operations. But in WO, when i have a data type :

public Number tmpCode

how can i use tmpCode for things like tmpCode += 1; or tmpCode++ etc?

As others have kindly pointed out WO *is* Java.

int i;
i = 5;
i ++;

Works fine in WO and in Java. Your problem is that you are working with and Object (Number) not a primitive (int).

Integer myNumber; (assume exists).
int i = myNumber.intValue();
i ++;
myNumber = new Integer(i);

hth,

--
;david

--
David LeBer
Codeferous Software
'co-defer-ous' adj. producing or containing code
site:   http://www.codeferous.com
blog: http://david.codeferous.com




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Number (From: Jim Wong <email@hidden>)

  • Prev by Date: Adding more conditions to a custom Qualifier - ERXInQualifier
  • Next by Date: External javascrpt file - referencing
  • Previous by thread: Re: Number
  • Next by thread: Instance numbers in WSDL
  • Index(es):
    • Date
    • Thread