# Intervalle des indices

!distribute items $wims_read_parm into slib_n, slib_type, slib_formula

!if $slib_static_r1=$empty
 slib_r1=!shuffle 50
 !distribute item $slib_r1 into slib_r1, slib_r2
 !if $slib_r1 > $slib_r2
  !exchange slib_r1, slib_r2
 !endif
 slib_static_r1=$[$slib_r1+2]
 slib_static_r2=$[$slib_r2+2]
!endif
!default slib_dir=!randint 1,4
!default slib_semi=!randitem semi-ouvert, semi-ferm
slib_data=!line $slib_dir of &#91;,&#93;,ferm,0,0\
	&#93;,&#91;,ouvert,1,-1\
	&#91;,&#91;,$slib_semi,0,-1\
	&#93;,&#93;,$slib_semi,1,0
!distribute item $slib_data into slib_left, slib_right, slib_itype, slib_c1, slib_c2
!default slib_static_r3=!randitem 1,2
!if $slib_static_r3=1
 slib_is=!randitem qui appartiennent , appartenant 
!else
 slib_is=!randitem qui n'appartiennent pas , n'appartenant pas 
!endif

slib_start=$[$slib_static_r1+$slib_c1+1]
slib_end=$[min($slib_static_r2+($slib_c2)+1,$slib_n)]

slib_1=!makelist x for x=$slib_start to $slib_end
!if $slib_static_r3!=1
 slib_all=!makelist x for x=1 to $slib_n
 slib_1=!listcomplement $slib_1 in $slib_all
!endif
!if $slib_formula != $empty
 slib_list=!item 4 to -1 of $wims_read_parm
 slib_list=!item $slib_1 of $slib_list
 slib_sum=!sum $slib_formula for x in $slib_list
!else
 slib_sum=
!endif

slib_ind=!randitem tous les indices,l'ensemble des indices, les indices
slib_2=pour $slib_ind var_i $slib_is l'intervalle $slib_itype <tt>$slib_left$slib_static_r1;$slib_static_r2$slib_right</tt>

slib_out=$slib_1\
$slib_2\
$slib_sum

