forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1356 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
5f2392a740
commit
1b6b1b2dcf
|
@ -565,9 +565,13 @@ double Variable::evaluate(char *str, Tree **tree)
|
||||||
// istop = end of number, including scientific notation
|
// istop = end of number, including scientific notation
|
||||||
|
|
||||||
int istart = i;
|
int istart = i;
|
||||||
int istop = istart + strspn(&str[i],"0123456789eE.-") - 1;
|
while (isdigit(str[i]) || str[i] == '.') i++;
|
||||||
while (str[istop] == '-') istop--;
|
if (str[i] == 'e' || str[i] == 'E') {
|
||||||
i = istop + 1;
|
i++;
|
||||||
|
if (str[i] == '+' || str[i] == '-') i++;
|
||||||
|
while (isdigit(str[i])) i++;
|
||||||
|
}
|
||||||
|
int istop = i - 1;
|
||||||
|
|
||||||
int n = istop - istart + 1;
|
int n = istop - istart + 1;
|
||||||
char *number = new char[n+1];
|
char *number = new char[n+1];
|
||||||
|
|
Loading…
Reference in New Issue