Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
539 bpr 1
!goto $wims_read_parm
2
 
3
:def
4
title=Pourcentage
5
synonyme=percents
6
input=function
7
!exit
8
 
9
:proc
10
 
11
formula=!rawmath $formula
12
formula2=!rawmath $formula2
13
formula2=!trim $formula2
14
!if abs($formula2)<=0
15
 formula2=
16
!endif
17
 
18
wims_print_precision=$[min(5,$precision)]
19
!if $formula2!=$empty
20
 result=$[100*($formula)/($formula2)]
21
!else
22
 result=$[($formula)*100]
23
!endif
24
 
25
!exit
26
 
27
:output
28
!if $formula2!=$empty
29
 !htmlmath $formula
30
 est $result% de
31
 !htmlmath $formula2
32
 .
33
!else
34
 !htmlmath $formula
35
 = $result%.
36
!endif
37
!exit
38