Rev 16113 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | |
2 | !if $methsubstep>1 |
||
16113 | bpr | 3 | !exit |
20 | reyssat | 4 | !endif |
5 | |||
6 | !distribute item integerp,ratnump,constantp,constantp into C_ZZ,C_QQ,C_RR,C_CC |
||
7 | |||
8 | !for i=1 to $methparmcnt |
||
16113 | bpr | 9 | typ=!item $i of $methparmtype |
10 | !distribute words $typ into typ,typ2 |
||
11 | p_=!singlespace $(methparm$i) |
||
12 | p_=!trim $p_ |
||
13 | n_=!itemcnt $p_ |
||
14 | !if $typ!=$empty and $p_=$empty |
||
15 | :empty |
||
16 | !if $i isitemof $methparmrelax |
||
17 | !goto cont |
||
18 | !else |
||
19 | error=empty_data |
||
20 | !exit |
||
21 | !endif |
||
20 | reyssat | 22 | !endif |
16113 | bpr | 23 | !if $typ=choice and $typ2!=$empty and $typ2>0 |
24 | !if $i isitemof $methparmrelax |
||
25 | start_=0 |
||
26 | !else |
||
27 | start_=1 |
||
28 | !endif |
||
29 | !bound methparm$i between integer $start_ and $typ2 default $ |
||
30 | !if $(methparm$i)=$empty |
||
31 | error=bad_data |
||
32 | !exit |
||
33 | !endif |
||
34 | !goto cont |
||
20 | reyssat | 35 | !endif |
16113 | bpr | 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 |
||
60 | ptest=$[$p_] |
||
61 | !if NaN isin $ptest or Inf isin $ptest |
||
62 | error=bad_data |
||
63 | !exit |
||
64 | !endif |
||
65 | !if $m_environ iswordof ZZ QQ RR |
||
66 | !if $m_environ iswordof ZZ QQ |
||
67 | p_=!singlespace $p_ |
||
68 | !distribute item ^(,^ ( into t1_,t2_ |
||
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 |
||
20 | reyssat | 82 | !endif |
16113 | bpr | 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 |
||
20 | reyssat | 90 | error=bad_data |
91 | !exit |
||
92 | !endif |
||
16113 | bpr | 93 | methparmobj$i=!line $p_ of $(mtobj$i) |
94 | N=!itemcnt $(methparmobj$i) |
||
95 | !if $N<2 |
||
96 | error=bad_data |
||
97 | !exit |
||
20 | reyssat | 98 | !endif |
99 | !endif |
||
16113 | bpr | 100 | :cont |
101 | methparm$i=$p_ |
||
20 | reyssat | 102 | !next i |
16204 | bpr | 103 | !readproc deduc/meth/$module_language/$meth.def check |
20 | reyssat | 104 | |
105 | !if $error!=$empty |
||
16113 | bpr | 106 | !exit |
20 | reyssat | 107 | !endif |
108 | !readproc deduc/newobj.proc |
||
109 | |||
110 | m_objects=!translate internal $\ |
||
111 | $ to $ $ in $objects |
||
112 | |||
113 | !if ($askcontext>1 and $contextlist!=$empty) or \ |
||
114 | ($askresult>1 and $resultlist!=$empty) |
||
16113 | bpr | 115 | !read deduc/meth2b.proc |
20 | reyssat | 116 | !endif |