Subversion Repositories wimsdev

Rev

Rev 2071 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2071 zjchen 1
!set methtit=方程两边加上一个数
2
!set methparmtype=number,parm equation
3
!set methhelp=这个方法把一个方程 \(a = b)\
4
 转换成等价方程 \(a + n = b + n), 其中 \(n) 是一个数.
5
 
6
!if $wims_read_parm iswordof form check
7
 !goto $wims_read_parm
8
!endif
9
 
10
!exit
11
:form
12
 把数
13
 !read deduc/methparm.phtml 1,15
14
 加到方程
15
 !read deduc/methparm.phtml 2
16
的两边
17
!exit
18
:check
19
 !distribute items $methparmobj2 into data,left,sign,right
17063 bpr 20
 methexp=把 \($methparm1) 加到 \($left $sign $right) 的两边
2071 zjchen 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
 
2071 zjchen 33
 contextlist=$ct_Always,\
34
    $ct_Onlywhen所加的数有固定的符号,\
35
    $ct_Onlywhen所加的数是正的
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
 
2071 zjchen 43
  resultlist=$newobject2,\
44
    $newleft $newsign $badright,\
45
    $badleft $newsign $newright
46
 !endif
47
 
48
!exit
49