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