Blame | Last modification | View Log | RSS feed
!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 , 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