writes a string or expression(s) to a file or pipe - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Input and Output : Output : writestat

writestat - writes a string or expression(s) to a file or pipe

Calling Sequence

writestat(file, expr ...)




file descriptor or filename



zero or more Maple expressions to be printed



The writestat function writes the specified Maple expressions to the specified file, separated by commas, and followed by a newline.


The writestat function returns a count of the number of characters written.


If file is default, the output is written to the current output stream. This is where other Maple output would currently go.


If file is terminal, the line is written to the top level output stream. The top level output stream is the current output stream that was in effect when Maple was started.


If no expressions are given, only a newline is printed.


If one or more expressions are given, they are printed using correct Maple syntax (in other words, they are in a form suitable for parsing). Names which require backquotes are printed with backquotes.


To print names without quotes, use writeline(file, someName).


Calling writestat(default,...) is equivalent to lprint(...); except that parseable Maple syntax is always guaranteed.


If the file being written to is a STREAM or RAW file, and it is currently open in READ mode, it will be reopened in WRITE mode with type TEXT at the same offset.


If a filename is given, and that file is not yet open, it is opened in WRITE mode with type TEXT.


writestatdefault,This is a test,a+b2,This is also a test,TEST

"This is a test", a+1/2*b, "This is also a test", TEST







See Also

file_types, fprintf, IO_errors, readline, readstat, writebytes, writeline

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam