From 4ddfb8af09b7a534277d17e9ca6443789e234161 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 30 Apr 2007 15:34:51 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@543 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/variable.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index d2afda384c..c21de54490 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -204,17 +204,14 @@ void Variable::set(int narg, char **arg) } /* ---------------------------------------------------------------------- - single-value EQUAL variable created by command-line argument + single-value INDEX variable created by command-line argument ------------------------------------------------------------------------- */ void Variable::set(char *name, char *value) { - int ivar = find(name); - if (ivar >= 0) error->all("Command-line variable already exists"); - char **newarg = new char*[3]; newarg[0] = name; - newarg[1] = "equal"; + newarg[1] = "index"; newarg[2] = value; set(3,newarg); delete [] newarg; @@ -831,7 +828,7 @@ double Variable::evaluate(char *str, Tree *tree) void Variable::build_parse_tree(int ivar) { if (style[ivar] != ATOM) - error->all("Cannot build parse tree for non atom style variable"); + error->all("Cannot build parse tree for variable that is not atom style"); ptree = new Tree(); double tmp = evaluate(data[ivar][0],ptree); }