Rev 16120 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !set methtit=Substitution in an expression |
2 | !set methtit2=Substitution in a global algebraic expression global or partial |
||
3 | !set methenv=ZZ QQ RR CC |
||
4 | !set methparmtype=parm algexp nocomma nopart, parm equation >, choice 2 |
||
5 | !set methhelp=Substitution in an expression according to an existing equation. |
||
6 | |||
7 | !if $wims_read_parm iswordof form check |
||
16120 | bpr | 8 | !goto $wims_read_parm |
20 | reyssat | 9 | !endif |
10 | |||
11 | !exit |
||
12 | :form |
||
16120 | bpr | 13 | Apply the |
14 | !formselect methparm3 list 1,2 prompt substitution, reverse substitution |
||
15 | !read deduc/methparm.phtml 2 |
||
16207 | bpr | 16 | $ in the expression |
16120 | bpr | 17 | !read deduc/methparm.phtml 1 |
20 | reyssat | 18 | !exit |
19 | :check |
||
16120 | bpr | 20 | !distribute items $methparmobj2 into hd,left,eq,right |
21 | eqt== |
||
22 | !if $eq!=$eqt |
||
20 | reyssat | 23 | error=Bad justification of substitution. |
24 | !exit |
||
16120 | bpr | 25 | !endif |
26 | !if $methparm3=2 |
||
20 | reyssat | 27 | !exchange left,right |
16120 | bpr | 28 | !endif |
29 | lvar=!varlist $left |
||
30 | !if $lvar=$left |
||
20 | reyssat | 31 | subst=subst |
16120 | bpr | 32 | !else |
20 | reyssat | 33 | subst=ratsubst |
16120 | bpr | 34 | !endif |
35 | !distribute items $methparmobj1 into hd2,exp2 |
||
36 | !read deduc/sub/simplify $subst($right,$left,$exp2) |
||
37 | !if $out=$empty |
||
20 | reyssat | 38 | error=Fail |
39 | !exit |
||
16120 | bpr | 40 | !endif |
20 | reyssat | 41 | |
16120 | bpr | 42 | newobject1=$out |
43 | oldobject=1 |
||
44 | methexp=Substitution \($left = $right). |
||
20 | reyssat | 45 | !exit |