OUT INDEX

OUT _ _ _ _ _ _ _ _ _ _ _ _ command

The out command directs output to the filename that is its argument, until another out changes the output file, or shut closes it.

syntax:

out<filename> or out "<pathname> " or out t

<filename> must be in the current directory, or be a valid complete file description for your system. If the file name is not in the current directory, quote marks are needed around the file name. If the file already exists, a message is printed allowing you to decide whether to supersede the contents of the file with new material.

To restore output to the terminal, type out t, or shut the file. When you use out t, the file remains available, and if you open it again (with another out), new material is appended rather than overwriting.

To write a file using out that can be input at a later time, the switch nat must be turned off, so that the standard linear fo rm is saved that can be read in by in. If nat is on, exponents are printed on the line above the expression, which causes trouble when REDUCE tries to read the file.

There is a slight complication if you are using the out command from inside a file to create another file. The echo switch is normally off at the top-level and on while reading files (so you can see what is being read in). If you create a file using out at the top-level, the result lines are printed into the file as you want them. But if you create such a file from inside a file, the echo switch is on, and every line is echoed, first as you typed it, then as REDUCE parsed it, and then once more for the file. Therefore, when you create a file from a file, you need to turn echo off explicitly before the out command, and turn it back on when you shut the created file, so your executing file echoes as it should. This behavior also means that as you watch the file execute, you cannot see the lines that are being put into the out file. As soon as you turn echo on, you can see output again.