From: mike lowis Date: Fri, 9 Apr 2021 18:40:52 +0000 (-0400) Subject: removed ODD() X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f6573fb9f40cf4875bac7117e7de14890174daaf;p=proto%2Fobnc.git removed ODD() --- diff --git a/src/Table.c b/src/Table.c index 3a33876..a3b0f2d 100644 --- a/src/Table.c +++ b/src/Table.c @@ -68,7 +68,7 @@ struct ScopeDesc { static int initialized = 0; -static const char *predeclaredNames[24]; +static const char *predeclaredNames[23]; static Trees_Node predeclaredNodes[LEN(predeclaredNames)]; static Scope globalScope, currentScope; @@ -96,7 +96,6 @@ void Table_Init(void) {"LEN", TREES_PROCEDURE_KIND, TREES_LEN_PROC}, {"LSL", TREES_PROCEDURE_KIND, TREES_LSL_PROC}, {"NEW", TREES_PROCEDURE_KIND, TREES_NEW_PROC}, - {"ODD", TREES_PROCEDURE_KIND, TREES_ODD_PROC}, {"ORD", TREES_PROCEDURE_KIND, TREES_ORD_PROC}, {"PACK", TREES_PROCEDURE_KIND, TREES_PACK_PROC}, {"ROR", TREES_PROCEDURE_KIND, TREES_ROR_PROC}, diff --git a/tests/obnc/passing/T4Expressions.obn b/tests/obnc/passing/T4Expressions.obn index 6f7ce7c..d700b0b 100644 --- a/tests/obnc/passing/T4Expressions.obn +++ b/tests/obnc/passing/T4Expressions.obn @@ -379,7 +379,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln; const eps = 0.01; (*make sure function procedures with constant parameters are constant expressions*) absConst = ABS(0); - oddConst = ODD(0); lslConst = LSL(0, 0); asrConst = ASR(0, 0); rorConst = ROR(0, 1); @@ -407,12 +406,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln; ASSERT(j = 1); ASSERT(i = 1); - ASSERT(~ODD(-2)); - ASSERT(ODD(-1)); - ASSERT(~ODD(0)); - ASSERT(ODD(1)); - ASSERT(~ODD(2)); - a := ""; ASSERT(LEN(a) = 10); @@ -480,7 +473,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln; ASSERT(CHR(x) = 1X); i := absConst; - b := oddConst; i := lslConst; i := asrConst; i := rorConst;