Rev 16321 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16321 | bpr | 1 | !set methtit=Añadir un número a ambos lados de una ecuación |
20 | reyssat | 2 | !set methparmtype=number,parm equation |
16321 | bpr | 3 | !set methhelp=Este método transforma una ecuación \(a = b)\ |
4 | en la ecuación equivalente \(a + n = b + n), donde \(n) es un número. |
||
20 | reyssat | 5 | |
6 | !if $wims_read_parm iswordof form check |
||
7 | !goto $wims_read_parm |
||
8 | !endif |
||
9 | |||
10 | !exit |
||
11 | :form |
||
16321 | bpr | 12 | Añadir el número |
20 | reyssat | 13 | !read deduc/methparm.phtml 1,15 |
16321 | bpr | 14 | en ambos lados de la ecuación |
20 | reyssat | 15 | !read deduc/methparm.phtml 2 |
16 | |||
17 | !exit |
||
18 | :check |
||
19 | !distribute items $methparmobj2 into data,left,sign,right |
||
17063 | bpr | 20 | methexp=Añadir \($methparm1) en ambos lados de \($left $sign $right) |
20 | reyssat | 21 | |
22 | !read deduc/sub/simplify ($left + ($methparm1)\ |
||
23 | $right + ($methparm1) |
||
24 | !distribute lines $out into newleft,newright |
||
25 | !if $newleft=$empty or $newright=$empty |
||
26 | error=bad_data |
||
27 | !exit |
||
28 | !endif |
||
29 | newsign=$sign |
||
30 | newobject2=$newleft $newsign $newright |
||
31 | oldobject=2 |
||
17063 | bpr | 32 | |
20 | reyssat | 33 | contextlist=$ct_Always,\ |
16321 | bpr | 34 | $ct_Onlywhen el numero sumado tiene signo constante,\ |
35 | $ct_Onlywhen el numero sumado es positivo |
||
20 | reyssat | 36 | |
37 | !if $askresult>1 |
||
38 | !read deduc/sub/simplify $left - ($methparm1)\ |
||
39 | $right - ($methparm1) |
||
40 | !distribute lines $out into badleft, badright |
||
41 | badsign=!translate internal <> to >< in $newsign |
||
17063 | bpr | 42 | |
20 | reyssat | 43 | resultlist=$newobject2,\ |
44 | $newleft $newsign $badright,\ |
||
45 | $badleft $newsign $newright |
||
46 | !endif |
||
47 | |||
48 | !exit |