Thread Rating:
  • 403 Vote(s) - 2.71 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BigDecimal -> int
03-09-2015, 11:35 AM,
#2
RE: BigDecimal -> int
「整数部」みたいな取り方ができればいいですけどね。
to-String を挟まなくても、スケール設定したならto-doubleでもよいかも。

Code:
{def i = {total.set-scale 0}}
{value {i.to-double} asa int}


Messages In This Thread
BigDecimal -> int - by kay - 03-07-2015, 06:35 PM
RE: BigDecimal -> int - by umemura - 03-09-2015, 11:35 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  BigDecimal の丸め umemura 0 3,113 11-20-2014, 11:19 AM
Last Post: umemura
  BigDecimal.to-String で、小数点桁に0が増えてしまう umemura 1 8,285 12-19-2013, 02:03 PM
Last Post: umemura
  なぜ String から BigDecimal にキャスト可能なのか umemura 2 4,475 12-12-2013, 01:24 PM
Last Post: crispincross
Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('1212')