Possible Duplicate:
Calculation in Play 2.0 Framework template engine
If I have some view say page.scala.html and I passed a hash map to this view. Now I want to extract and perform some arithmetic operations on this page like this:
@pageMap.get("newPt") - @pageMap.get("oldPt") =
(((@pageMap.get("oldPt")) - (@pageMap.get("newPt")))
but instead of printing the diff on right side I got the values of "oldPt" and "newPt" something like this:
50 – 40 = (((50)) – ((40)))
How to overcome this problem?
You can write blocks of scala codes using the @( … ) or @{ … } syntax.