WRITE_FILE
Writes the contents of a buffer or range to a specified file or to the
output file associated with the buffer; optionally returns a string for
the output file specification.
Syntax
[string2 :=] WRITE_FILE ({buffer | range} [,string1])
Parameters
buffer The buffer whose contents you want to write to a file.
range The range whose contents you want to write to a file.
string1 The output file specification. If you do not specify a
file, VAXTPU uses the output file associated with the
buffer. If there is no associated output file, VAXTPU
prompts for one.
Examples
1. WRITE_FILE (CURRENT_BUFFER, "myfile.txt");
Writes out the current buffer to a file called MYFILE.TXT in your
current (default) directory.
2. out_file := WRITE_FILE (select_range, "myfile.txt");
Stores in the variable OUT_FILE the file specification used for
writing out the select range.
3. WRITE_FILE (select_range, READ_LINE ("Output file: "));
Writes out the select range to a file, using READ_LINE to prompt for
the output file specification.
Related topics
EXIT QUIT READ_FILE SET(NO_WRITE) SET(OUTPUT_FILE)