Subversion Repositories wimsdev

Rev

Rev 16135 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!set methtit2=Multiply an equation by a non-zero number
2
!set methtit=Multiply an equation by a number
3
!set methenv=ZZ QQ RR CC
4
!set methparmtype=number,parm equation
5
!set methhelp=This method transforms an equation \(A = B)\
6
 into the equivalent equation \(A*n = B*n), where \(n) is a number,\
7
 which must be non-zero in order to guarantie the equivalence of the\
8
 originating equation and the transformed one.
9
 
10
!if $wims_read_parm iswordof form check
11
 !goto $wims_read_parm
12
!endif
13
 
14
!exit
15
:form
16
 Multiply the equation
17
 !read deduc/methparm.phtml 2
18
 by the number
19
 !read deduc/methparm.phtml 1,10
20
 
21
!exit
22
:check
23
 !distribute items $methparmobj2 into data,left,sign,right
24
 !if $methparm1=0
25
  error=Multiply an equation by 0 makes you lose information, and is therefore\
26
   prohibited.
27
  !advance penalty
28
  !exit
29
 !endif
30
 methexp=Multiply \($left $sign $right) by \($methparm1)
31
 
32
 !read deduc/sub/simplify ($left) * ($methparm1)\
33
	($right) * ($methparm1)
34
 !distribute lines $out into newleft,newright
35
 !if $newleft=$empty or $newright=$empty
36
  error=bad_data
37
  !exit
38
 !endif
39
 newsign=$sign
40
 newobject2=$newleft $newsign $newright
41
 oldobject=2
42
 
43
 contextlist=$ct_Onlywhen the multiplier is non-zero,\
44
	$ct_Onlywhen the multiplier is positive,\
45
	$ct_Onlywhen the two sides are positive,\
46
	$ct_Onlywhen the two sides are of the same sign
47
 
48
!exit
49