From fb0ebca1cc118d73a46886d4eedeaa04a270c44e Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 3 Oct 1994 09:50:32 +0000 Subject: [PATCH] corretto comportamento dell' operatore [,] (mid) git-svn-id: svn://10.65.10.50/trunk@303 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/expr.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/expr.cpp b/include/expr.cpp index 78d2e1991..4fbc45322 100755 --- a/include/expr.cpp +++ b/include/expr.cpp @@ -837,13 +837,7 @@ bool TExpression::compile(const char* expression, TTypeexp type) else { const int n2 = atoi(s2); - // if (n1 == 0) sc << format(" right(%s,%d)", _tok, n2); - // else - // if (n2 == 0) sc << format(" left(%s,%d)", _tok, n1); - // else - if (n2 == 0) sc << format(" mid(%s,%d,0)", _tok, n1); - else - sc << format(" mid(%s,%d,%d)", _tok, n1, n2 - n1 + 1); + sc << format(" mid(%s,%d,%d)", _tok, n1, (n2 < n1) ? -1 : n2 - n1 + 1); } } }