git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5336 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2010-11-29 17:57:09 +00:00
parent 3524795784
commit 03869e4781
3 changed files with 7 additions and 8 deletions

View File

@ -3163,13 +3163,13 @@ double Variable::evaluate_boolean(char *str)
// number: push value onto stack
// ----------------
} else if (isdigit(onechar) || onechar == '.') {
} else if (isdigit(onechar) || onechar == '.' || onechar == '-') {
if (expect == OP) error->all("Invalid Boolean syntax in if command");
expect = OP;
// istop = end of number, including scientific notation
int istart = i;
int istart = i++;
while (isdigit(str[i]) || str[i] == '.') i++;
if (str[i] == 'e' || str[i] == 'E') {
i++;
@ -3282,7 +3282,7 @@ double Variable::evaluate_boolean(char *str)
// push current operation onto stack
opstack[nopstack++] = op;
} else error->all("Invalid Boolean syntax in if command");
}