Rev 20 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16321 | bpr | 1 | !set methtit=Mostrar un objetivo por separado (cuando hay varios) |
20 | reyssat | 2 | !set methparmtype=choice |
16321 | bpr | 3 | !set methhelp=Cuando hay varios objetivos para demostrar, puede usar\ |
4 | este método para aislar uno en un caso separado. |
||
20 | reyssat | 5 | |
6 | !if $wims_read_parm iswordof form check |
||
16321 | bpr | 7 | !goto $wims_read_parm |
20 | reyssat | 8 | !endif |
9 | |||
10 | !if fixedgoal iswordof $m_options |
||
16321 | bpr | 11 | !set error1=fixedgoal |
20 | reyssat | 12 | !exit |
13 | !endif |
||
14 | |||
15 | !set n=!linecnt $m_goal |
||
16 | !if $n<1 |
||
16321 | bpr | 17 | !set error1=no_object |
18 | !exit |
||
20 | reyssat | 19 | !endif |
20 | !if $n<2 |
||
16321 | bpr | 21 | !set error1=Este método solo se puede utilizar cuando hay varios\ |
22 | objetivos que demostrar. |
||
23 | !exit |
||
20 | reyssat | 24 | !endif |
25 | |||
26 | !exit |
||
27 | :form |
||
16321 | bpr | 28 | Establecer el objetivo |
29 | !set gl=!replace internal , by , 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 | $ como caso aparte por demostrar. |
||
20 | reyssat | 34 | !exit |
35 | :check |
||
16321 | bpr | 36 | n=!linecnt $m_goal |
37 | !bound methparm1 between integer 0 and $n default 0 |
||
38 | !if $methparm1=0 |
||
20 | reyssat | 39 | error=empty_data |
40 | !exit |
||
16321 | bpr | 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 |
||
20 | reyssat | 48 | goal2=$goal2 ... |
16321 | bpr | 49 | !endif |
50 | casesplit=$goal1\ |
||
20 | reyssat | 51 | $goal2 |
16321 | bpr | 52 | !reset splitobject1,splitobject2 |
53 | n=!linecnt $objects |
||
54 | lt=< |
||
55 | !for i=1 to $n |
||
20 | reyssat | 56 | l=!line $i of $objects |
57 | w=!word 1 of $l |
||
58 | !if $w!=$lt |
||
16321 | bpr | 59 | splitobject1=!append line $l to $splitobject1 |
60 | splitobject2=!append line $l to $splitobject2 |
||
20 | reyssat | 61 | !else |
16321 | bpr | 62 | !if $l notsametext $lt $goal1 |
63 | splitobject2=!append line $l to $splitobject2 |
||
64 | !endif |
||
20 | reyssat | 65 | !endif |
16321 | bpr | 66 | !next i |
67 | splitobject1=!append line < $goal1 to $splitobject1 |
||
68 | objects=$splitobject1 |
||
69 | goalsplit=yes |
||
70 | methexp=Separar el objetivo $goal1 |
||
20 | reyssat | 71 | !exit |