appendto or write to a file, 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 file (myfile.txt). Is there a command which is required before the writeto or appendto command? The commands do not appear to work, also where is ”myfile.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 file myfile.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 file, as are the results of printf and lprint commands, but not ordinary output.

The file 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 files.

In later releases, or the DOS ordinary output would also be written to the file, 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.