Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!set methtit=Montrer un but séparément (quand il y en a plusieurs)
2
!set methparmtype=choice
3
!set methhelp=Quand il y a plusieurs buts à démontrer, vous pouvez utiliser\
4
 cette méthode pour en isoler un dans un cas séparé.
5
 
6
!if $wims_read_parm iswordof form check
7
 !goto $wims_read_parm
8
!endif
9
 
10
!if fixedgoal iswordof $m_options
11
 !set error1=fixedgoal
12
 !exit
13
!endif
14
 
15
!set n=!linecnt $m_goal
16
!if $n<1
17
 !set error1=no_object
18
 !exit
19
!endif
20
!if $n<2
21
 !set error1=Cette méthode est utilisable uniquement quand il y a plusieurs\
22
  buts à démontrer.
23
 !exit
24
!endif
25
 
26
!exit
27
:form
28
 Mettre le but
29
 !set gl=!replace internal , by &#44; in $m_goal
30
 !set gl=!lines2items $gl
31
 !set n=!itemcnt $gl
32
 !formselect methparm1 from 0 to $n prompt $ch_choose,$gl
33
 dans un cas séparé à démontrer.
34
!exit
35
:check
36
 n=!linecnt $m_goal
37
 !bound methparm1 between integer 0 and $n default 0
38
 !if $methparm1=0
39
  error=empty_data
40
  !exit
41
 !endif
42
 l=!line $methparm1 of $m_goal
43
 goal1=$l
44
 goal2=!replace line number $methparm1 by $ in $m_goal
45
 goal2=!nonempty lines $goal2
46
 goal2=!line 1 of $goal2
47
 !if $n>2
48
  goal2=$goal2 ...
49
 !endif
50
 casesplit=$goal1\
51
$goal2
52
 !reset splitobject1,splitobject2
53
 n=!linecnt $objects
54
 lt=<
55
 !for i=1 to $n
56
  l=!line $i of $objects
57
  w=!word 1 of $l
58
  !if $w!=$lt
59
   splitobject1=!append line $l to $splitobject1
60
   splitobject2=!append line $l to $splitobject2
61
  !else
62
   !if $l notsametext $lt $goal1
63
    splitobject2=!append line $l to $splitobject2
64
   !endif
65
  !endif
66
 !next i 
67
 splitobject1=!append line < $goal1 to $splitobject1
68
 objects=$splitobject1
69
 goalsplit=yes
70
 methexp=Séparer le but $goal1
71
!exit
72