summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-24 06:57:29 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-24 06:57:29 -0700
commit856c7188075a3e74ac4d9ef4dd665774f193d8d1 (patch)
treef981d3b4a23a763108d1590444fb56c8c4fae24f /eval.c
parentd510a260dd1755961fe85b6653e9832f49b34201 (diff)
downloadtxr-856c7188075a3e74ac4d9ef4dd665774f193d8d1.tar.gz
txr-856c7188075a3e74ac4d9ef4dd665774f193d8d1.tar.bz2
txr-856c7188075a3e74ac4d9ef4dd665774f193d8d1.zip
New functions: tofloatz and tointz.
* arith.c (tofloatz, tointz): New functions. * arith.h (tofloatz, tointz): Declared. * eval.c (eval_init): Register tofloatz and tointz intrinsics. * txr.1: Documented new functions.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index cfc1f32c..08c24f1a 100644
--- a/eval.c
+++ b/eval.c
@@ -5239,6 +5239,8 @@ void eval_init(void)
reg_fun(intern(lit("flo-int"), user_package), func_n1(flo_int));
reg_fun(intern(lit("tofloat"), user_package), func_n1(tofloat));
reg_fun(intern(lit("toint"), user_package), func_n2o(toint, 1));
+ reg_fun(intern(lit("tofloatz"), user_package), func_n1(tofloatz));
+ reg_fun(intern(lit("tointz"), user_package), func_n2o(tointz, 1));
reg_fun(intern(lit("less"), user_package), func_n1v(lessv));
reg_fun(intern(lit("greater"), user_package), func_n1v(greaterv));
reg_fun(intern(lit("lequal"), user_package), func_n1v(lequalv));