!set methtit=分离证明的目标
!set methparmtype=choice
!set methhelp=如果有几个目标要证明,\
可以用这个方法分离目标.

!if $wims_read_parm iswordof form check
 !goto $wims_read_parm
!endif

!if fixedgoal iswordof $m_options
 !set error1=fixedgoal
 !exit
!endif

!set n=!linecnt $m_goal
!if $n<1
 !set error1=no_object
 !exit
!endif
!if $n<2
 !set error1=这个方法仅适用于有几个目标要证明的情形.
 !exit
!endif

!exit
:form
 把目标
 !set gl=!replace internal , by &#44; in $m_goal
 !set gl=!lines2items $gl
 !set n=!itemcnt $gl
 !formselect methparm1 from 0 to $n prompt $ch_choose,$gl
 到分离的情况.
!exit
:check
 n=!linecnt $m_goal
 !bound methparm1 between integer 0 and $n default 0
 !if $methparm1=0
  error=empty_data
  !exit
 !endif
 l=!line $methparm1 of $m_goal
 goal1=$l
 goal2=!replace line number $methparm1 by $ in $m_goal
 goal2=!nonempty lines $goal2
 goal2=!line 1 of $goal2
 !if $n>2
  goal2=$goal2 ...
 !endif
 casesplit=$goal1\
$goal2
 !reset splitobject1,splitobject2
 n=!linecnt $objects
 lt=<
 !for i=1 to $n
  l=!line $i of $objects
  w=!word 1 of $l
  !if $w!=$lt
   splitobject1=!append line $l to $splitobject1
   splitobject2=!append line $l to $splitobject2
  !else
   !if $l notsametext $lt $goal1
    splitobject2=!append line $l to $splitobject2
   !endif
  !endif
 !next i 
 splitobject1=!append line < $goal1 to $splitobject1
 objects=$splitobject1
 goalsplit=yes
 methexp=分离目标 $goal1
!exit

