mirror of https://github.com/lammps/lammps.git
Added file support to print command
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10588 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
299e38ca0b
commit
9dc10e8118
|
@ -13,24 +13,43 @@
|
|||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>print str
|
||||
<P>print string keyword value:pre
|
||||
</P>
|
||||
<LI>string = text string to print, which may contain variables
|
||||
|
||||
<LI>zero or more keyword/value pairs may be appended
|
||||
|
||||
<LI>keyword = <I>file</I> or <I>append</I> or <I>screen</I>
|
||||
|
||||
<PRE> <I>file</I> value = filename
|
||||
<I>append</I> value = filename
|
||||
<I>screen</I> value = <I>yes</I> or <I>no</I>
|
||||
</PRE>
|
||||
<UL><LI>str = text string to print, which may contain variables
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>print "Done with equilibration"
|
||||
print Vol=$v
|
||||
print "The system volume is now $v"
|
||||
<PRE>print "Done with equilibration" file info.dat
|
||||
print Vol=$v append info.dat screen no
|
||||
print "The system volume is now $v"
|
||||
print 'The system volume is now $v'
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Print a text string to the screen and logfile. One line of output is
|
||||
generated. If the string has white space in it (spaces, tabs, etc),
|
||||
then you must enclose it in quotes so that it is treated as a single
|
||||
argument. If variables are included in the string, they will be
|
||||
evaluated and their current values printed.
|
||||
generated. The text string must be a single argument, so
|
||||
it should be enclosed in double quotes if it is more than one word.
|
||||
If it contains variables, they will be evaluated and
|
||||
their current values printed.
|
||||
</P>
|
||||
<P>If the <I>file</I> or <I>append</I> keyword is used, a filename is specified to
|
||||
which the output will be written. If <I>file</I> is
|
||||
used, then the filename is overwritten if it already exists. If
|
||||
<I>append</I> is used, then the filename is appended to if it already
|
||||
exists, or created if it does not exist.
|
||||
</P>
|
||||
<P>If the <I>screen</I> keyword is used, output to the screen and
|
||||
logfile can be turned on or off as desired.
|
||||
</P>
|
||||
<P>If you want the print command to be executed multiple times (with
|
||||
changing variable values), there are 3 options. First, consider using
|
||||
|
@ -55,6 +74,8 @@ thermodynamic properties, global values calculated by a
|
|||
</P>
|
||||
<P><A HREF = "fix_print.html">fix print</A>, <A HREF = "variable.html">variable</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
<P><B>Default:</B>
|
||||
</P>
|
||||
<P>The option defaults are no file output, and screen = yes.
|
||||
</P>
|
||||
</HTML>
|
||||
|
|
|
@ -10,24 +10,39 @@ print command :h3
|
|||
|
||||
[Syntax:]
|
||||
|
||||
print str :pre
|
||||
print string keyword value:pre
|
||||
|
||||
str = text string to print, which may contain variables :ul
|
||||
string = text string to print, which may contain variables :l
|
||||
zero or more keyword/value pairs may be appended :l
|
||||
keyword = {file} or {append} or {screen} :l
|
||||
{file} value = filename
|
||||
{append} value = filename
|
||||
{screen} value = {yes} or {no} :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
print "Done with equilibration"
|
||||
print Vol=$v
|
||||
print "The system volume is now $v"
|
||||
print "Done with equilibration" file info.dat
|
||||
print Vol=$v append info.dat screen no
|
||||
print "The system volume is now $v"
|
||||
print 'The system volume is now $v' :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Print a text string to the screen and logfile. One line of output is
|
||||
generated. If the string has white space in it (spaces, tabs, etc),
|
||||
then you must enclose it in quotes so that it is treated as a single
|
||||
argument. If variables are included in the string, they will be
|
||||
evaluated and their current values printed.
|
||||
generated. The text string must be a single argument, so
|
||||
it should be enclosed in double quotes if it is more than one word.
|
||||
If it contains variables, they will be evaluated and
|
||||
their current values printed.
|
||||
|
||||
If the {file} or {append} keyword is used, a filename is specified to
|
||||
which the output will be written. If {file} is
|
||||
used, then the filename is overwritten if it already exists. If
|
||||
{append} is used, then the filename is appended to if it already
|
||||
exists, or created if it does not exist.
|
||||
|
||||
If the {screen} keyword is used, output to the screen and
|
||||
logfile can be turned on or off as desired.
|
||||
|
||||
If you want the print command to be executed multiple times (with
|
||||
changing variable values), there are 3 options. First, consider using
|
||||
|
@ -52,4 +67,7 @@ thermodynamic properties, global values calculated by a
|
|||
|
||||
"fix print"_fix_print.html, "variable"_variable.html
|
||||
|
||||
[Default:] none
|
||||
[Default:]
|
||||
|
||||
The option defaults are no file output, and screen = yes.
|
||||
|
||||
|
|
Loading…
Reference in New Issue