help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'pwumain' (#powtils_main)

Out

Declaration

Source position: pwumain.pas line 130

procedure Out(

  const s: String

);

Notes

Use this procedure to write directly to the browser output.

Out() and similar functions handle all the low level details of CGI that one doesn't need to worry about. It performs tedious HTTP header initialization automatically (once, the very first time it is called). However one can still initialize more or override existing HTTP headers with SetHeader and such functions.

Write vs Out

You can still use the system.write() procedure if you are writing to a text file. However, if you call system.write() to standard out you will interfere with the way webwrite/out/outln handles gzip and headers. If Gzip is off, it is possible to call out() once, and then use system.write thereafter, but is not recommended.

Tips

See the OutA (WebWriteA) function to write multiple integers, strings, etc. all at once with an array input parameter.

This function is the same as the old WebWrite, it is just renamed in later versions of Powtils. WebWrite is still available for backwards compatibility.

Example

begin
  out('hi world');
end.
What a poem!

See Also

OutLn, OutA, OutF





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505