Float or double on Blackberry?

折月煮酒 提交于 2019-12-11 07:40:35

问题


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.


回答1:


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.)




回答2:


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




回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/5963479/float-or-double-on-blackberry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!