Hi,
I have the following code snippet ....

[% callcent = ( compnos / var.value ) * 100 %]

to calculate a percentage figure and it works fine, though in some cases it will
obviously tend to give me a lot of decimal places in the answer (13?) !

How can I resolve this, to, for example 2 dp?

As an aside I tried to use "div" to give me the integer result, but that wouldn't
work (returns zero), here is my attempt ....

[% callcent = ( compnos div var.value ) * 100 %]

Any help greatly appreciated.

Richard.



**********************************************************************
The information contained in this email is confidential and is intended for the 
recipient only. If you have received it in error, please notify us immediately by 
reply email and then delete it from your system. Please do not copy it or use it for 
any purposes, or disclose its contents to any other person or store or copy this 
information in any medium. The views contained in this email are those of the author 
and not necessarily those of Lorien plc.

Thank you for your co-operation.
**********************************************************************


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to