Subversion Repositories wimsdev

Rev

Rev 4982 | Rev 6557 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4978 guerimand 1
!if $wims_read_parm!=slib_header
2
 !goto proc
3
!endif
4
 
5
slib_author=Fabrice, Guerimand
6
 
7
slib_example=434,,\
8
60^2+1,1,.
9
 
10
!exit
11
 
12
:proc
13
!distribute item $wims_read_parm into slib_input,slib_option1,slib_option2
14
!bound slib_option1 within 0,1 default 1
15
!default slib_option2=$empty
16
slib_option2=!char 1 of $slib_option2
17
slib_input=$[$slib_input]
18
!if NaN isin $slib_input
19
 !exit
20
!endif
21
slib_st=$[floor(ln($slib_input)/ln(60))]
22
slib_out=<table border="0"><tr>
5736 bpr 23
slib_clou=<img src="gifs/numeration/clou.gif" alt="clou"/>
24
slib_chevron=<img src="gifs/numeration/chevron.gif" alt="chevron"/>
4978 guerimand 25
!for slib_k=$(slib_st) to 0 step -1
26
    slib_reste=$[$slib_input%(60^$slib_k)]
27
    slib_quo=$[($slib_input-$slib_reste)/(60^$slib_k)]
28
    slib_re2=$[$slib_quo%10]
29
    slib_quo2=$[($slib_quo-$slib_re2)/10]
30
    !if $slib_re2=0 and $slib_quo2=0
31
     !if $slib_option1>0
32
      slib_out=!append word <td>&nbsp;</td> to $slib_out
33
     !endif
34
    !else
35
     slib_quo2=!makelist $slib_chevron for v=1 to $slib_quo2
36
     slib_re2=!makelist $slib_clou for v=1 to $slib_re2
37
     slib_tmp=!replace , by $empty in $slib_quo2$slib_re2
38
     slib_out=!append word <td align="center">$slib_tmp</td> to $slib_out
39
     slib_input=$slib_reste
40
    !endif
41
    !if $slib_k>0 and $slib_option2!=$empty
42
     slib_out=!append word <td>$slib_option2</td> to $slib_out
43
    !endif
44
!next slib_st
45
slib_out=$slib_out</tr></table>