Subversion Repositories wimsdev

Rev

Rev 13585 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4979 guerimand 1
!if $wims_read_parm!=slib_header
13585 bpr 2
  !goto proc
4979 guerimand 3
!endif
4
 
5
slib_author=Fabrice,Guerimand
6
 
7
slib_example=435,\
8
12,30
9
 
10
!exit
11
 
12
:proc
5152 guerimand 13
!distribute item $wims_read_parm into slib_input,slib_option,slib_sep
4979 guerimand 14
slib_input=$[rint($slib_input)]
15
!if NaN isin $slib_input
16
 !exit
17
!endif
18
!bound slib_option between 5 and 50 default 20
19
!bound slib_input between 1 and 10^5 default 0
5152 guerimand 20
!bound slib_sep within item,$empty default $empty
4979 guerimand 21
slib_cnt=!charcnt $slib_input
22
slib_out=$empty
23
!for slib_k=1 to $slib_cnt
13585 bpr 24
  slib_char=!char $slib_k of $slib_input
25
  !if $slib_char!=0
26
    slib_valeur=egyptien_$[10^($slib_cnt-$slib_k)]
17173 bpr 27
    slib_tmp=!makelist <img width="$slib_option" src="gifs/numeration/$(slib_valeur).gif" alt="$slib_valeur"> for v=1 to $(slib_char)
13585 bpr 28
    !if $slib_sep=item
5152 guerimand 29
      slib_out=!append item $slib_tmp to $slib_out
13585 bpr 30
    !else
5152 guerimand 31
      slib_tmp=!items2words $slib_tmp
32
      slib_out=$slib_out $slib_tmp
33
    !endif
13585 bpr 34
  !endif
4979 guerimand 35
!next slib_k