up previous next
close    --    close an output stream


Syntax
close(OUT: OSTREAM)

Description
This function closes the output stream OUT. If OUT refers to a file, this will "flush" any buffered output (no value is returned). If OUT came from OpenOString , this will return the string which has been "printed" into the stream.

Example
/**/  file := OpenOFile("my-test"); -- open file for output from CoCoA
/**/  print "test" on file;  -- write to my-file
/**/  close(file);  -- close the output stream, "flushes" all output

/**/  S := OpenOString();
/**/  print "abc", 123 on S;
/**/  close(S);
abc123

See Also