Re: Number
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>) |