mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-02-06 13:31:28 +00:00
Fix NUMBERP
This commit is contained in:
parent
ec3b9de737
commit
0fd3afdd7a
Binary file not shown.
@ -1014,6 +1014,11 @@ def natv_eq(symptr, expr)
|
||||
return bool_pred(iseq)
|
||||
end
|
||||
|
||||
def natv_numberp(symptr, expr)
|
||||
expr = eval_expr(expr=>car)
|
||||
return bool_pred(expr and (expr->type & TYPE_MASK == NUM_TYPE))
|
||||
end
|
||||
|
||||
def natv_and(symptr, expr)
|
||||
while expr and eval_expr(expr=>car)
|
||||
expr = expr=>cdr
|
||||
@ -1355,6 +1360,7 @@ new_sym("CONS")=>natv = @natv_cons
|
||||
new_sym("LIST")=>natv = @natv_list
|
||||
new_sym("ATOM")=>natv = @natv_atom
|
||||
new_sym("EQ")=>natv = @natv_eq
|
||||
new_sym("NUMBERP")=>natv = @natv_numberp
|
||||
new_sym("NOT")=>natv = @natv_null
|
||||
new_sym("AND")=>natv = @natv_and
|
||||
new_sym("OR")=>natv = @natv_or
|
||||
|
@ -118,11 +118,6 @@ def push_num(numptr)#0
|
||||
fin
|
||||
end
|
||||
|
||||
def natv_numberp(symptr, expr)
|
||||
expr = eval_expr(expr)
|
||||
return bool_pred(expr and (expr->type & TYPE_MASK == NUM_TYPE))
|
||||
end
|
||||
|
||||
def natv_sum(symptr, expr)
|
||||
var num
|
||||
var[2] intsum
|
||||
@ -788,7 +783,6 @@ fpu:constE()
|
||||
fpu:pullExt(@tempext)
|
||||
new_sym("MATH_E")=>apval = new_float(@tempext) ^ NULL_HACK
|
||||
fpu:sinX() // Force load of ELEMS library
|
||||
new_sym("NUMBERP")=>natv = @natv_numberp
|
||||
new_sym("SUM")=>natv = @natv_sum
|
||||
new_sym("+")=>natv = @natv_sum
|
||||
new_sym("-")=>natv = @natv_sub
|
||||
|
Loading…
x
Reference in New Issue
Block a user