Rev 20 | Rev 16204 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 16113 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | 1 | ||
2 | !if $methsubstep>1 |
2 | !if $methsubstep>1 |
3 | !exit |
3 | !exit |
4 | !endif |
4 | !endif |
5 | 5 | ||
6 | !distribute item integerp,ratnump,constantp,constantp into C_ZZ,C_QQ,C_RR,C_CC |
6 | !distribute item integerp,ratnump,constantp,constantp into C_ZZ,C_QQ,C_RR,C_CC |
7 | 7 | ||
8 | !for i=1 to $methparmcnt |
8 | !for i=1 to $methparmcnt |
9 | typ=!item $i of $methparmtype |
9 | typ=!item $i of $methparmtype |
10 | !distribute words $typ into typ,typ2 |
10 | !distribute words $typ into typ,typ2 |
11 | p_=!singlespace $(methparm$i) |
11 | p_=!singlespace $(methparm$i) |
12 | p_=!trim $p_ |
12 | p_=!trim $p_ |
13 | n_=!itemcnt $p_ |
13 | n_=!itemcnt $p_ |
14 | !if $typ!=$empty and $p_=$empty |
14 | !if $typ!=$empty and $p_=$empty |
15 | :empty |
15 | :empty |
16 | !if $i isitemof $methparmrelax |
16 | !if $i isitemof $methparmrelax |
17 | !goto cont |
17 | !goto cont |
18 | !else |
18 | !else |
19 | error=empty_data |
19 | error=empty_data |
20 | !exit |
20 | !exit |
21 | !endif |
21 | !endif |
22 | !endif |
22 | !endif |
23 | !if $typ=choice and $typ2!=$empty and $typ2>0 |
23 | !if $typ=choice and $typ2!=$empty and $typ2>0 |
24 | !if $i isitemof $methparmrelax |
24 | !if $i isitemof $methparmrelax |
25 | start_=0 |
25 | start_=0 |
26 | !else |
26 | !else |
27 | start_=1 |
27 | start_=1 |
28 | !endif |
28 | !endif |
29 | !bound methparm$i between integer $start_ and $typ2 default $ |
29 | !bound methparm$i between integer $start_ and $typ2 default $ |
30 | !if $(methparm$i)=$empty |
30 | !if $(methparm$i)=$empty |
31 | error=bad_data |
31 | error=bad_data |
32 | !exit |
32 | !exit |
33 | !endif |
33 | !endif |
34 | !goto cont |
34 | !goto cont |
35 | !endif |
- | |
36 | !if $typ iswordof number function equation |
- | |
37 | badtest=!text select <>[] in $p_ |
- | |
38 | badteste=!text select = in $p_ |
- | |
39 | !if $badtest!=$empty or $n_!=1 or ($type!=equation and $badteste!=$empty) |
- | |
40 | error=bad_data |
- | |
41 | !exit |
- | |
42 | !endif |
- | |
43 | !if nofloat iswordof $m_options and . isin $p_ |
- | |
44 | error=nofloat |
- | |
45 | !exit |
- | |
46 | !endif |
- | |
47 | vars=!append item $newvariables to $variables |
- | |
48 | wims_rawmath_variables=$vars |
- | |
49 | p_=!rawmath $p_ |
- | |
50 | v=!varlist $p_ |
- | |
51 | !if $v!=$empty |
- | |
52 | v=!listcomplement $vars in $v |
- | |
53 | !if $v!=$empty |
- | |
54 | error=unknown_variable |
- | |
55 | unknown=!item 1 of $v |
- | |
56 | !exit |
- | |
57 | !endif |
- | |
58 | !endif |
35 | !endif |
- | 36 | !if $typ iswordof number function equation |
|
- | 37 | badtest=!text select <>[] in $p_ |
|
- | 38 | badteste=!text select = in $p_ |
|
- | 39 | !if $badtest!=$empty or $n_!=1 or ($type!=equation and $badteste!=$empty) |
|
- | 40 | error=bad_data |
|
- | 41 | !exit |
|
- | 42 | !endif |
|
- | 43 | !if nofloat iswordof $m_options and . isin $p_ |
|
- | 44 | error=nofloat |
|
- | 45 | !exit |
|
- | 46 | !endif |
|
- | 47 | vars=!append item $newvariables to $variables |
|
- | 48 | wims_rawmath_variables=$vars |
|
- | 49 | p_=!rawmath $p_ |
|
- | 50 | v=!varlist $p_ |
|
- | 51 | !if $v!=$empty |
|
- | 52 | v=!listcomplement $vars in $v |
|
- | 53 | !if $v!=$empty |
|
- | 54 | error=unknown_variable |
|
- | 55 | unknown=!item 1 of $v |
|
- | 56 | !exit |
|
- | 57 | !endif |
|
- | 58 | !endif |
|
59 | !if $typ=number |
59 | !if $typ=number |
60 | ptest=$[$p_] |
60 | ptest=$[$p_] |
61 | !if NaN isin $ptest or Inf isin $ptest |
61 | !if NaN isin $ptest or Inf isin $ptest |
62 | error=bad_data |
62 | error=bad_data |
63 | !exit |
63 | !exit |
64 | !endif |
64 | !endif |
65 | !if $m_environ iswordof ZZ QQ RR |
65 | !if $m_environ iswordof ZZ QQ RR |
66 | !if $m_environ iswordof ZZ QQ |
66 | !if $m_environ iswordof ZZ QQ |
67 | p_=!singlespace $p_ |
67 | p_=!singlespace $p_ |
68 | !distribute item ^(,^ ( into t1_,t2_ |
68 | !distribute item ^(,^ ( into t1_,t2_ |
69 | !if $t1_ isin $p_ or $t2_ isin $p_ |
69 | !if $t1_ isin $p_ or $t2_ isin $p_ |
- | 70 | error=bad_data |
|
- | 71 | !exit |
|
- | 72 | !endif |
|
- | 73 | !endif |
|
- | 74 | test=!exec maxima $(C_$m_environ)($p_); |
|
- | 75 | !if $test notsametext true |
|
- | 76 | error=bad_data |
|
- | 77 | !exit |
|
- | 78 | !endif |
|
- | 79 | !endif |
|
- | 80 | !endif |
|
- | 81 | !goto cont |
|
- | 82 | !endif |
|
- | 83 | !if $typ=parm |
|
- | 84 | p_=$[rint($p_)] |
|
- | 85 | !if $p_<=0 |
|
- | 86 | !goto empty |
|
- | 87 | !endif |
|
- | 88 | N=!linecnt $(mtobj$i) |
|
- | 89 | !if NaN isin $p_ or $p_>$N |
|
- | 90 | error=bad_data |
|
- | 91 | !exit |
|
- | 92 | !endif |
|
- | 93 | methparmobj$i=!line $p_ of $(mtobj$i) |
|
- | 94 | N=!itemcnt $(methparmobj$i) |
|
- | 95 | !if $N<2 |
|
70 | error=bad_data |
96 | error=bad_data |
71 | !exit |
97 | !exit |
72 | !endif |
- | |
73 | !endif |
98 | !endif |
74 | test=!exec maxima $(C_$m_environ)($p_); |
- | |
75 | !if $test notsametext true |
- | |
76 | error=bad_data |
- | |
77 | !exit |
- | |
78 | !endif |
- | |
79 | !endif |
- | |
80 | !endif |
- | |
81 | !goto cont |
- | |
82 | !endif |
- | |
83 | !if $typ=parm |
- | |
84 | p_=$[rint($p_)] |
- | |
85 | !if $p_<=0 |
- | |
86 | !goto empty |
- | |
87 | !endif |
99 | !endif |
88 | N=!linecnt $(mtobj$i) |
- | |
89 | !if NaN isin $p_ or $p_>$N |
- | |
90 | error=bad_data |
- | |
91 | !exit |
- | |
92 | !endif |
- | |
93 | methparmobj$i=!line $p_ of $(mtobj$i) |
- | |
94 | N=!itemcnt $(methparmobj$i) |
- | |
95 | !if $N<2 |
- | |
96 | error=bad_data |
- | |
97 | !exit |
- | |
98 | !endif |
- | |
99 | !endif |
- | |
100 | :cont |
100 | :cont |
101 | methparm$i=$p_ |
101 | methparm$i=$p_ |
102 | !next i |
102 | !next i |
103 | 103 | ||
104 | !readproc deduc/meth/$module_language/$meth.def check |
104 | !readproc deduc/meth/$module_language/$meth.def check |
105 | !if $error!=$empty |
105 | !if $error!=$empty |
106 | !exit |
106 | !exit |
107 | !endif |
107 | !endif |
108 | !readproc deduc/newobj.proc |
108 | !readproc deduc/newobj.proc |
109 | 109 | ||
110 | m_objects=!translate internal $\ |
110 | m_objects=!translate internal $\ |
111 | $ to $ $ in $objects |
111 | $ to $ $ in $objects |
112 | 112 | ||
113 | !if ($askcontext>1 and $contextlist!=$empty) or \ |
113 | !if ($askcontext>1 and $contextlist!=$empty) or \ |
114 | ($askresult>1 and $resultlist!=$empty) |
114 | ($askresult>1 and $resultlist!=$empty) |
115 | !read deduc/meth2b.proc |
115 | !read deduc/meth2b.proc |
116 | !endif |
116 | !endif |
117 | - |