!!! fichier de traitement des donnes de l'exo de type 1 !!!

## l'tape 2
!if $navig!=$etape
  !if $propsrecord!=$empty
    propsList=
    rindic=
    rindicL=
    rfmatL=
    pn=!linecnt $propsrecord
    
    pn=$[$pn-1]
    !for i=1 to $pn
      prop=$(propsrecord[$i;])
      prop=!trim $prop
      !if ; isin $prop
        propsList=!append line $prop, to $propsList
       !else
        propsList=!append line ($prop), to $propsList
      !endif
    !next i
    prop=!char 1 to -2 of $(propsList[$pn;])
    propsList=!replace line number $pn by $prop in $propsList  
  !endif
  etape=$navig
  !exit
!endif

!if $propsList=$empty
  exalert=$(alerts[1;])
  !exit
!endif

propsnb=!itemcnt $propsList
!if $propsnb<2
  exalert=$(alerts[2;])
  !exit
!endif
!if $propsnb>100
  exalert=$(alerts[3;])
  !exit
!endif

propsrecord=
pvid=0
!for i=1 to $propsnb
  prop=!item $i of $propsList
  prop=!trim $prop
  prop=!translate $\
  $ to $ $ in $prop
  nv=!charcnt $prop
  !if $nv<3
    pvid=$[$pvid+1]
  !endif
  !if ; isin $prop 
    propsrecord=!append line $prop to $propsrecord
   !else
    prop=!char 2 to -2 of $prop
    propsrecord=!append line $prop to $propsrecord
  !endif    
!next i
!if $pvid!=0
  exalert=$(alerts[8;])
  !exit
!endif

prop=!trim $nonprop
prop=!translate $\
$ to $ $ in $prop
propsrecord=!append line $prop to $propsrecord
  
rowsnb=$[floor(($propsnb+1)/2)]
extrarow=$[($propsnb+1)%2]

rpmat=
propsList= 

etape=$[$etape+1]
!exit
