# Write String to stdout

> [HTML Version](writestringtostdout.htm)

_Updated November 2025_

**xcall CGIUTL, CGIOP\_STDOUT, string, status**

_Opcode_ 4, CGIOP\_STDOUT writes _string_ to stdout. 

**Parameters**

_string  _([String](string.md) or unformatted) \[out\]

The text to be output to the browser. A CRLF is appended to the string, analogous to a PRINT statement. For binary output, such as a data file download to the browser, the string parameter must be type X, in which case no CRLF is appended.

_status _(Signed [Num](num.md))  \[out\]

On success, returns the number of bytes output. Negative values represent system error codes.

**Comments**

Use this in place of PRINT statements to output individual characters or lines to the new web page. In -cgi or -cgifast mode, the output of PRINT statements is sent to the stderr stream rather than stdout. For more information, see the [Common Gateway Interface](commongatewayint.md) discussion.