git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3743 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -546,6 +546,9 @@ void Input::ifthenelse()
|
|||||||
|
|
||||||
int iarg,first,last;
|
int iarg,first,last;
|
||||||
|
|
||||||
|
// identify range of commands within arg list for then or else
|
||||||
|
// for else, if no comands, just return
|
||||||
|
|
||||||
if (strcmp(arg[3],"then") != 0) error->all("Illegal if command");
|
if (strcmp(arg[3],"then") != 0) error->all("Illegal if command");
|
||||||
if (flag) {
|
if (flag) {
|
||||||
iarg = first = 4;
|
iarg = first = 4;
|
||||||
@ -554,7 +557,7 @@ void Input::ifthenelse()
|
|||||||
} else {
|
} else {
|
||||||
iarg = 4;
|
iarg = 4;
|
||||||
while (iarg < narg && strcmp(arg[iarg],"else") != 0) iarg++;
|
while (iarg < narg && strcmp(arg[iarg],"else") != 0) iarg++;
|
||||||
if (iarg == narg) error->all("Illegal if command");
|
if (iarg == narg) return;
|
||||||
first = iarg+1;
|
first = iarg+1;
|
||||||
last = narg-1;
|
last = narg-1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user