!!! fichier d'initialisation de l'exo de type 3 !!!

!if $titre=$empty 
  auteur=Joachim YAMEOGO
  imel=yameogo@math.unice.fr
  titre=test
  enonceR=!record 3 of comsDir/enonces
!endif

rpmat=$propsrepList
rfmat=$foncsrepList
obsList=
propsList=
foncsList=

!if $obsrecord!=$empty
  obsnb=!linecnt $obsrecord
  !for i=1 to $obsnb
    obsList=!append line $(obsrecord[$i;]), to $obsList
  !next i
   obsList=!replace line number $obsnb by $(obsrecord[$obsnb;]) in $obsList
!endif

!if $propsrecord!=$empty
  pn=!linecnt $propsrecord
  pn=$[$pn-1]
  propsnb=$pn  
  !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

!if $foncsrecord!=$empty
  foncsnb=!linecnt $foncsrecord
  !for i=1 to $foncsnb
    fonc=!trim $(foncsrecord[$i;])
    foncsList=!append line $fonc, to $foncsList
  !next i
  fonc=!char 1 to -2 of $(foncsList[$foncsnb;])
  foncsList=!replace line number $foncsnb by $fonc in $foncsList
!endif

!if $demo=oui
  obsList=!record 1 of demosDir/demo3data
  propsList=!record 2 of demosDir/demo3data
  foncsList=!record 3 of demosDir/demo3data
  foncstypList=!record 4 of demosDir/demo3data
  obsnb=!itemcnt $obsList
  propsnb=!itemcnt $propsList
  foncsnb=!itemcnt $foncsList
  propsrepList=!record 5 of demosDir/demo3data
  foncsrepList=!record 6 of demosDir/demo3data
  indicList_obj=!record 7 of demosDir/demo3data
  indicList_fonc=!record 8 of demosDir/demo3data
  enonceR=!record 9 of demosDir/demo3data
!endif

chronobs=0
chronfoncs=0

af1=nombre&nbsp;entier
af2=nombre&nbsp;rel
af3=nombre&nbsp;complexe
af4=texte
af5=ensemble&nbsp;fini
af6=ensemble&nbsp;formel
af7=vecteur
af8=fonction
af9=expression&nbsp;algbrique
af10=expression&nbsp;formelle
af11=matrice

typ1=default
typ2=default
typ3=default
typ4=default
typ5=set
typ6=fset
typ7=vector
typ8=function
typ9=algexp
typ10=formal
typ11=matrix

typafList=
ftypList=
!for i=1 to 11
  typafList=!append line $(af$(i)) to $typafList
  ftypList=!append line $(typ$(i)) to $ftypList
!next i

Nbtyp=11

etapesnb=9

typvarcnt=20

indicList=$indicList_obj
!if $indicList!=$empty
  !for i=1 to $obsnb
    dinc=!trim $(indicList[$i;])
    dinc=!char 2 of $dinc
    !if $dinc=0
      indicList=!replace line number $i by (0,$ $) in $indicList
    !endif
  !next i
  Lnb=!linecnt $indicList
  !if $Lnb<$obsnb
    !for i=1 to $[$obsnb-$Lnb]
      !append line (0,$ $) to $indicList
    !next i
  !endif
  indicList_obj=$indicList
!endif
indicList=$indicList_fonc
!if $indicList!=$empty
  !for i=1 to $obsnb
    !for j=1 to $foncsnb
      hlp=!trim $(indicList[$i;$j])
      hlp=!char 2 of $hlp
      !if $hlp=0
        hlp=!replace item number $j by (0,$ $) in $(indicList[$i;])
	indicList=!replace line number $i by $hlp in $indicList
      !endif
    !next j
    Lnb=!itemcnt $(indicList[$i;])
    !if $Lnb<$foncsnb
      !for j=1 to $[$foncsnb-$Lnb]
        hlp=!append item (0,$ $) to $(indicList[$i;])
      !next j
      indicList=!replace line number $i by $hlp in $indicList
    !endif
  !next i
  indicList_fonc=$indicList
!endif
