outstring
outstring( ) =>p_openedPort/nil
Description
Takes no arguments and returns an opened output port for strings (or an outport). After a port is opened, it can be used with functions, such as fprintf, println, and close that write to an output port. You need to use the getOutstring function to retrieve the content of output port (while it is open).
You can use the close function to close the output port.
Arguments
Value Returned
Examples
s = outstring() ; string port opened for output
=> port:s
fprintf(s "the value is %d" 1) ; fprintf into string
getOutstring(s)
=> the value is 1
close(s)
getOutstring(s)
=> nil
Related Topics
Return to top