Write string to stdout

Updated November 2014; see History

xcall CGIUTL, CGIOP_STDOUT, string, status

Opcode CGIOP_STDOUT writes string to stdout. A CRLF is appended to the string, analogous to a PRINT statement. Use this in place of PRINT statements to output individual characters or lines to the new web page. (In -cgi mode, the output of PRINT statements is sent to the stderr stream rather than stdout. For more information, see the A-Shell command line switch CGI.)

History

2014 November, A-Shell 6.1.1395:  Binary output is now supported, specified variable must be type X. This provides the possibility of an A-Shell CGI program rendering a download to the browser. Which has some security advantages over statically storing the file to be downloaded and letting the web server handle it directly.