Rev 20 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | # Standardized number checker, sensible to m_environ. |
2 | # Input are numbers, linewise. |
||
3 | # Output are lines, in $out. `true' if true, `bad' if non-checkable. |
||
4 | |||
5 | I__=!nonempty lines $wims_read_parm |
||
6 | n__=!linecnt $I__ |
||
7 | !reset out,p__ |
||
8 | !distribute item integerp,ratnump,constantp into p_ZZ,p_QQ,p_RR |
||
9 | ch__=$(p_$m_environ) |
||
10 | !for i__=1 to $n__ |
||
16136 | bpr | 11 | l__=!line $i__ of $I__ |
12 | l__=$maximasimp($l__) |
||
13 | !if $m_environ notwordof ZZ QQ RR |
||
14 | p__=!append line "bad"; to $p__ |
||
15 | !else |
||
16 | p__=!append line $ch__($l__); to $p__ |
||
17 | !endif |
||
20 | reyssat | 18 | !next i__ |
19 | |||
20 | out__=!exec maxima $p__ |
||
21 | |||
22 | !for i__=1 to $n__ |
||
16136 | bpr | 23 | l__=!line $i__ of $out__ |
24 | !if $l__ notwordof true false |
||
25 | l__=bad |
||
26 | !endif |
||
27 | out=!append line $l__ to $out |
||
20 | reyssat | 28 | !next i__ |