From 4e0d82ac69b1c37e8a5315c43fba920f26d10ed8 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Thu, 14 May 2020 17:36:09 +0000 Subject: [PATCH] added "len" operator, still disabled git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@166 4df02467-bbd4-4a76-a152-e7ce94205b78 --- src/alu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alu.c b/src/alu.c index 5c7caba..23fa5f1 100644 --- a/src/alu.c +++ b/src/alu.c @@ -75,6 +75,7 @@ enum op_id { OPID_ARCSIN, // arcsin(v) OPID_ARCCOS, // arccos(v) OPID_ARCTAN, // arctan(v) + OPID_LEN, // len(v) // dyadic operators: OPID_POWEROF, // v^w OPID_MULTIPLY, // v*w @@ -156,7 +157,7 @@ static struct op ops_tan = {42, OPGROUP_MONADIC, OPID_TAN, "tan()" }; static struct op ops_arcsin = {42, OPGROUP_MONADIC, OPID_ARCSIN, "arcsin()" }; static struct op ops_arccos = {42, OPGROUP_MONADIC, OPID_ARCCOS, "arccos()" }; static struct op ops_arctan = {42, OPGROUP_MONADIC, OPID_ARCTAN, "arctan()" }; -//static struct op ops_len = {42, OPGROUP_MONADIC, OPID_LEN, "len()" }; +static struct op ops_len = {42, OPGROUP_MONADIC, OPID_LEN, "len()" }; // variables @@ -200,6 +201,7 @@ static struct ronode function_list[] = { PREDEFNODE("address", &ops_addr), PREDEFNODE("int", &ops_int), PREDEFNODE("float", &ops_float), +// PREDEFNODE("len", &ops_len), PREDEFNODE(s_arcsin, &ops_arcsin), PREDEFNODE(s_arccos, &ops_arccos), PREDEFNODE(s_arctan, &ops_arctan),