forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11209 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
106d58b165
commit
82897a55ab
|
@ -100,19 +100,27 @@ single leading "#" will comment out the entire command.
|
|||
</P>
|
||||
<P>(3) The line is searched repeatedly for $ characters, which indicate
|
||||
variables that are replaced with a text string. See an exception in
|
||||
(6).
|
||||
(6).
|
||||
</P>
|
||||
<P>If the $ is followed by curly brackets, then the variable name is the
|
||||
text inside the curly brackets. If no curly brackets follow the $,
|
||||
then the variable name is the single character immediately following
|
||||
the $. Thus ${myTemp} and $x refer to variable names "myTemp" and
|
||||
"x".
|
||||
"x".
|
||||
</P>
|
||||
<P>If the $ is followed by parenthesis, then the text inside the
|
||||
parenthesis is treated as an "immediate" variable and evaluated as an
|
||||
<A HREF = "variable.html">equal-style variable</A>. This is a way to use numeric
|
||||
formulas in an input script without having to assign them to variable
|
||||
names. For example, these 3 input script lines:
|
||||
<P>How the variable is converted to a text string depends on what style
|
||||
of variable it is; see the <A HREF = "variable">variable</A> doc page for details.
|
||||
It can be a variable that stores multiple text strings, and return one
|
||||
of them. The returned text string can be multiple "words" (space
|
||||
separated) which will then be interpreted as multiple arguments in the
|
||||
input command. The variable can also store a numeric formula which
|
||||
will be evaluated and its numeric result returned as a string.
|
||||
</P>
|
||||
<P>As a special case, if the $ is followed by parenthesis, then the text
|
||||
inside the parenthesis is treated as an "immediate" variable and
|
||||
evaluated as an <A HREF = "variable.html">equal-style variable</A>. This is a way
|
||||
to use numeric formulas in an input script without having to assign
|
||||
them to variable names. For example, these 3 input script lines:
|
||||
</P>
|
||||
<PRE>variable X equal (xlo+xhi)/2+sqrt(v_area)
|
||||
region 1 block $X 2 INF INF EDGE EDGE
|
||||
|
@ -148,14 +156,19 @@ underscores, or punctuation characters.
|
|||
line are arguments.
|
||||
</P>
|
||||
<P>(6) If you want text with spaces to be treated as a single argument,
|
||||
it can be enclosed in either double or single quotes. E.g.
|
||||
it can be enclosed in either double or single quotes. A long single
|
||||
argument enclosed in quotes can even span multiple lines if the "&"
|
||||
character is used, as described above. E.g.
|
||||
</P>
|
||||
<PRE>print "Volume = $v"
|
||||
print 'Volume = $v'
|
||||
print 'Volume = $v'
|
||||
variable a string "red green blue &
|
||||
purple orange cyan"
|
||||
if "$<I>steps</I> > 1000" then quit
|
||||
</PRE>
|
||||
<P>The quotes are removed when the single argument is stored internally.
|
||||
See the <A HREF = "dump_modify.html">dump modify format</A> or <A HREF = "print.html">print</A> or
|
||||
</P>
|
||||
<P>See the <A HREF = "dump_modify.html">dump modify format</A> or <A HREF = "print.html">print</A> or
|
||||
<A HREF = "if.html">if</A> commands for examples. A "#" or "$" character that is
|
||||
between quotes will not be treated as a comment indicator in (2) or
|
||||
substituted for as a variable in (3).
|
||||
|
|
|
@ -96,19 +96,27 @@ single leading "#" will comment out the entire command.
|
|||
|
||||
(3) The line is searched repeatedly for $ characters, which indicate
|
||||
variables that are replaced with a text string. See an exception in
|
||||
(6).
|
||||
(6).
|
||||
|
||||
If the $ is followed by curly brackets, then the variable name is the
|
||||
text inside the curly brackets. If no curly brackets follow the $,
|
||||
then the variable name is the single character immediately following
|
||||
the $. Thus $\{myTemp\} and $x refer to variable names "myTemp" and
|
||||
"x".
|
||||
"x".
|
||||
|
||||
If the $ is followed by parenthesis, then the text inside the
|
||||
parenthesis is treated as an "immediate" variable and evaluated as an
|
||||
"equal-style variable"_variable.html. This is a way to use numeric
|
||||
formulas in an input script without having to assign them to variable
|
||||
names. For example, these 3 input script lines:
|
||||
How the variable is converted to a text string depends on what style
|
||||
of variable it is; see the "variable"_variable doc page for details.
|
||||
It can be a variable that stores multiple text strings, and return one
|
||||
of them. The returned text string can be multiple "words" (space
|
||||
separated) which will then be interpreted as multiple arguments in the
|
||||
input command. The variable can also store a numeric formula which
|
||||
will be evaluated and its numeric result returned as a string.
|
||||
|
||||
As a special case, if the $ is followed by parenthesis, then the text
|
||||
inside the parenthesis is treated as an "immediate" variable and
|
||||
evaluated as an "equal-style variable"_variable.html. This is a way
|
||||
to use numeric formulas in an input script without having to assign
|
||||
them to variable names. For example, these 3 input script lines:
|
||||
|
||||
variable X equal (xlo+xhi)/2+sqrt(v_area)
|
||||
region 1 block $X 2 INF INF EDGE EDGE
|
||||
|
@ -144,13 +152,18 @@ underscores, or punctuation characters.
|
|||
line are arguments.
|
||||
|
||||
(6) If you want text with spaces to be treated as a single argument,
|
||||
it can be enclosed in either double or single quotes. E.g.
|
||||
it can be enclosed in either double or single quotes. A long single
|
||||
argument enclosed in quotes can even span multiple lines if the "&"
|
||||
character is used, as described above. E.g.
|
||||
|
||||
print "Volume = $v"
|
||||
print 'Volume = $v'
|
||||
print 'Volume = $v'
|
||||
variable a string "red green blue &
|
||||
purple orange cyan"
|
||||
if "${steps} > 1000" then quit :pre
|
||||
|
||||
The quotes are removed when the single argument is stored internally.
|
||||
|
||||
See the "dump modify format"_dump_modify.html or "print"_print.html or
|
||||
"if"_if.html commands for examples. A "#" or "$" character that is
|
||||
between quotes will not be treated as a comment indicator in (2) or
|
||||
|
|
Loading…
Reference in New Issue