up previous next
print on

print to an output stream

Syntax
print  E: OBJECT  on  OUT: OSTREAM

Description
This command prints the value of expression E to the output stream OUT . Currently, the command can be used to print to files, strings, or the CoCoA window. In the first two cases, the appropriate device must be opened with OpenOFile or OpenOString .

Example
/**/  file := OpenOFile("my-test");  -- open "my-test" for output from CoCoA
/**/  println "hello world" on file;   -- print string into "mytest"
/**/  close(file);  -- close the file
See OpenOFile for an example using output strings. For printing to the CoCoA window, just use println E .
See Also