Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !set methtit=分离证明的目标 |
2 | !set methparmtype=choice |
||
3 | !set methhelp=如果有几个目标要证明,\ |
||
4 | 可以用这个方法分离目标. |
||
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=这个方法仅适用于有几个目标要证明的情形. |
||
22 | !exit |
||
23 | !endif |
||
24 | |||
25 | !exit |
||
26 | :form |
||
27 | 把目标 |
||
28 | !set gl=!replace internal , by , in $m_goal |
||
29 | !set gl=!lines2items $gl |
||
30 | !set n=!itemcnt $gl |
||
31 | !formselect methparm1 from 0 to $n prompt $ch_choose,$gl |
||
32 | 到分离的情况. |
||
33 | !exit |
||
34 | :check |
||
35 | n=!linecnt $m_goal |
||
36 | !bound methparm1 between integer 0 and $n default 0 |
||
37 | !if $methparm1=0 |
||
38 | error=empty_data |
||
39 | !exit |
||
40 | !endif |
||
41 | l=!line $methparm1 of $m_goal |
||
42 | goal1=$l |
||
43 | goal2=!replace line number $methparm1 by $ in $m_goal |
||
44 | goal2=!nonempty lines $goal2 |
||
45 | goal2=!line 1 of $goal2 |
||
46 | !if $n>2 |
||
47 | goal2=$goal2 ... |
||
48 | !endif |
||
49 | casesplit=$goal1\ |
||
50 | $goal2 |
||
51 | !reset splitobject1,splitobject2 |
||
52 | n=!linecnt $objects |
||
53 | lt=< |
||
54 | !for i=1 to $n |
||
55 | l=!line $i of $objects |
||
56 | w=!word 1 of $l |
||
57 | !if $w!=$lt |
||
58 | splitobject1=!append line $l to $splitobject1 |
||
59 | splitobject2=!append line $l to $splitobject2 |
||
60 | !else |
||
61 | !if $l notsametext $lt $goal1 |
||
62 | splitobject2=!append line $l to $splitobject2 |
||
63 | !endif |
||
64 | !endif |
||
65 | !next i |
||
66 | splitobject1=!append line < $goal1 to $splitobject1 |
||
67 | objects=$splitobject1 |
||
68 | goalsplit=yes |
||
69 | methexp=分离目标 $goal1 |
||
70 | !exit |
||
71 |