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



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

OutF

Declaration

Source position: pwumain.pas line 133

procedure OutF(

  const s: String

);

Notes

The OutF function is like the Out function except that it formats any $macro variables first by making a call to Fmt (WebFormat).

OutF stands for 'Output Formatted', It is similar to the TemplateOut (WebTemplateOut) function but instead of using a template file, the string you send as the parameter acts as the template.

Tips

Old function name was WebWriteF.

Use OutFF if you want malicious less than and greater than signs filtered into html entities (instead of trimmed). Double F stands for 'Formatted and Filtered' with secure filtering instead of trimming, whereas single F stands for Formatted (with automatic trimming of malicious characters).

Example

var
  somemacro: string;
begin
  somemacro:= 'blue';
  SetVar('color', somemacro);
  OutF('He looked at the sky, it was {$color}');
  OutF('That shade of $color is nice.');
end.  





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