corretto comportamento dell' operatore [,] (mid)
git-svn-id: svn://10.65.10.50/trunk@303 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5df8cfc13b
commit
fb0ebca1cc
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user