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