Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
16321 bpr 1
!set methtit2=Dividir una ecuación por un número distinto de cero
2
!set methtit=Dividir una ecuación por un número
20 reyssat 3
!set methenv=ZZ QQ RR CC
4
!set methparmtype=number,parm equation
16321 bpr 5
!set methhelp=Este método transforma una ecuación \(A = B)\
6
 en la ecuación equivalente \(A/n = B/n), donde \(n) es un número\
7
 distinto de cero.
20 reyssat 8
 
9
!if $wims_read_parm iswordof form check
16321 bpr 10
  !goto $wims_read_parm
20 reyssat 11
!endif
12
 
13
!exit
14
:form
16321 bpr 15
 Dividir la ecuacion
20 reyssat 16
 !read deduc/methparm.phtml 2
16321 bpr 17
por un número
20 reyssat 18
 !read deduc/methparm.phtml 1,10
19
 
20
!exit
21
:check
16321 bpr 22
!distribute items $methparmobj2 into data,left,sign,right
23
!ifval $methparm1=0
24
  error=¡División por cero!
20 reyssat 25
  !advance penalty
26
  !exit
16321 bpr 27
!endif
28
methexp=Dividir \($left $sign $right) entre \($methparm1)
20 reyssat 29
 
16321 bpr 30
!read deduc/sub/simplify ($left) / ($methparm1)\
20 reyssat 31
	($right) / ($methparm1)
16321 bpr 32
!distribute lines $out into newleft, newright
33
!if $newleft=$empty or $newright=$empty
20 reyssat 34
  error=bad_data
35
  !exit
16321 bpr 36
!endif
37
newsign=$sign
38
newobject2=$newleft $newsign $newright
39
oldobject=2
20 reyssat 40
 
16321 bpr 41
contextlist=$ct_Onlywhen el divisor no es nulo,\
42
	$ct_Onlywhen el divisor es positivo,\
20 reyssat 43
	$ct_Always,\
16321 bpr 44
	$ct_Onlywhen ambos lados son positivos,\
45
	$ct_Onlywhen ambos lados tienen el mismo signo
46
 
20 reyssat 47
!exit