Float or double on Blackberry?

2019-08-12 05:33发布

Can you use double or float on Blackberry?

If so, in which OS version or hardware model?

Edit: I believe the answers I get here, but then something else must be the problem.

4条回答
不美不萌又怎样
2楼-- · 2019-08-12 05:52

I put a post together a while back that shows a timing comparison with the different data types and different arithmetic processing on the BlackBerry. You might not be looking for this type of information, but it's interesting to see how your options compare.

http://www.blurrywords.com/2009/05/02/blackberry-java-arithmetic-comparisons.html

查看更多
Emotional °昔
3楼-- · 2019-08-12 05:53

You can use double or float on any Blackberry OS and hardware model.

查看更多
该账号已被封号
4楼-- · 2019-08-12 06:09

The only Java version that does not support floating-point types is the CLDC configuration of Java ME in Version 1.0 (they were re-added in Version 1.1). I'm not sure whether there are any Blackberry devices that only support CLDC 1.0, but I doubt it.

查看更多
疯言疯语
5楼-- · 2019-08-12 06:14

Apparently floating point doesn't work on some versions of Blackberry; see the comments.

Bow, if a J2ME device implements the CLDC 1.0 profile, the manufacturer is not required to include support for floating point arithmetic in the platform: see

http://cmer.cis.uoguelph.ca/cs1cs3/slides.ppt

In CLDC 1.1, floating point support is mandatory.


In comments on other questions, you say that Blackberry is CLDC 1.1.

If your Blackberry's floating point support doesn't work and it really claims to implement CLDC 1.1, then that's either a bug in the execution platform or the build tool-chain, or a problem with the way you are using the tool-chain. (I don't develop J2ME stuff, so I can't be more specific.)

查看更多
登录 后发表回答