#### appendto or write to a ﬁle, maplevr3 and windows (27.6.00)

##### Charles Saunders

I am using Maple V Release 3. What is the entire process in order to writeto or appendto a ﬁle (myﬁle.txt). Is there a command which is required before the writeto or appendto command? The commands do not appear to work, also where is ”myﬁle.txt” placed on my computer.

##### Robert Israel (28.6.00)

It appears that this does not work as expected in the worksheet interface of Release 3 under Windows. It does work in the DOS version of Release 3, and in later releases. For example:

In Release 3 under Windows 95, this leaves the following in the ﬁle myﬁle.txt:

b;
printf(c\n);
c
lprint(d);
d
writeto(terminal);

Thus: input lines after the one containing the ”writeto” and up to and including the one with the next ”writeto” (but without the prompts) are sent to the ﬁle, as are the results of printf and lprint commands, but not ordinary output.

The ﬁle will be placed in the directory that is current when Maple is started: by default this will be Maple’s ”bin” directory, so you want to be very careful not to overwrite any of Maple’s own ﬁles.

In later releases, or the DOS ordinary output would also be written to the ﬁle, as would the ">" prompt from input lines, so it would contain

                                       a

> b;
b

> printf(c\n);
c
> lprint(d);
d
> writeto(terminal);


As for the statements in the help page ?writeto:


... all future commands will have their results immediately stored in filename and
will not be displayed on the screen. - While in this mode, no prompt will appear
at the terminal.

this may once have been true, but now does not seem to be the case at all.