!set methtit2=方程除以非零数
!set methtit=用一个数除方程
!set methenv=ZZ QQ RR CC
!set methparmtype=number,parm equation
!set methhelp=此方法把方程 \(A = B)\
 变成等价方程 \(A/n = B/n), 其中 \(n) 是非零数.

!if $wims_read_parm iswordof form check
 !goto $wims_read_parm
!endif

!exit
:form
 把方程
 !read deduc/methparm.phtml 2
 除以数
 !read deduc/methparm.phtml 1,10

!exit
:check
 !distribute items $methparmobj2 into data,left,sign,right
 !ifval $methparm1=0
  error=用 0 除!
  !advance penalty
  !exit
 !endif
 methexp=把 \($left $sign $right) 除以 \($methparm1)

 !read deduc/sub/simplify ($left) / ($methparm1)\
    ($right) / ($methparm1)
 !distribute lines $out into newleft, newright
 !if $newleft=$empty or $newright=$empty
  error=bad_data
  !exit
 !endif
 newsign=$sign
 newobject2=$newleft $newsign $newright
 oldobject=2

 contextlist=$ct_Onlywhen除数非零,\
    $ct_Onlywhen除数是正的,\
    $ct_Always,\
    $ct_Onlywhen两边是正的,\
    $ct_Onlywhen两边同号
 
!exit

