Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
2071 zjchen 1
!set methtit=重写方程
2
!set methenv=ZZ QQ RR CC
3
!set methparmtype=parm equation, function, choice, function
4
!set methhelp=你可以利用这个方法把已给方程通过加项,、
5
 交换方程两边, 乘以非零数等的复合变形成一个等价方程.
6
 
7
!if $wims_read_parm iswordof form check
8
 !goto $wims_read_parm
9
!endif
10
 
11
!exit
12
:form
13
 重写方程
14
 !read deduc/methparm.phtml 1
17234 bpr 15
 为 <br>
16
 <input size=15 name=methparm2 value="$methparm2">
2071 zjchen 17
 =
17234 bpr 18
 <input size=15 name=methparm4 value="$methparm4">
2071 zjchen 19
 !set methremark=你的新方程必须等价于原方程.
20
!exit
21
:check
22
 !distribute items $methparmobj1 into data,left1,sign1,right1
23
 sign2==
24
 sign3==
25
 !if $sign2 notsametext $sign1 and $sign3 notsametext $sign1
26
  :badequiv
27
  error=你的新方程不等价于原方程!
28
  !advance penalty
29
  !exit
30
 !endif
17234 bpr 31
 
2071 zjchen 32
 check1=($left1) - ($right1)
33
 check2=($methparm2) - ($methparm4)
17234 bpr 34
 
2071 zjchen 35
 !read deduc/sub/checkzero $check1\
36
    $check2
37
 !distribute line $out into out1, out2
38
 !read deduc/sub/_Simplify ($check1) / ($check2)
39
 out3=$out
40
 !if $out1=yes or $out2=yes
41
  !if $out1!=yes or $out2!=yes
42
   !goto badequiv
43
  !endif
44
 !else
45
  out3=$[$out3]
46
  !if NaN isin $out3 or Inf isin $out3
47
   !goto badequiv
48
  !endif
49
 !endif
50
 methexp=重写 \($left1 = $right1)
51
 
52
 newobject1=$methparm2 = $methparm4
53
 oldobject=1
54
 
55
!exit
56