Rev 20 | Blame | Compare with Previous | Last modification | View Log | RSS feed
# Standardized number checker, sensible to m_environ.
# Input are numbers, linewise.
# Output are lines, in $out. `true' if true, `bad' if non-checkable.
I__=!nonempty lines $wims_read_parm
n__=!linecnt $I__
!reset out,p__
!distribute item integerp,ratnump,constantp into p_ZZ,p_QQ,p_RR
ch__=$(p_$m_environ)
!for i__=1 to $n__
l__=!line $i__ of $I__
l__=$maximasimp($l__)
!if $m_environ notwordof ZZ QQ RR
p__=!append line "bad"; to $p__
!else
p__=!append line $ch__($l__); to $p__
!endif
!next i__
out__=!exec maxima $p__
!for i__=1 to $n__
l__=!line $i__ of $out__
!if $l__ notwordof true false
l__=bad
!endif
out=!append line $l__ to $out
!next i__