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



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

FmtStr

Format a string with given arguments.

Declaration

Source position: line 0

procedure FmtStr(

  var Res: String;

  const Fmt: String;

  const args: array of Const

);

procedure FmtStr(

  var Res: String;

  const Fmt: String;

  const args: array of Const;

  const FormatSettings: TFormatSettings

);

Description

FmtStr calls Format with Fmt and Args as arguments, and stores the result in Res. For more information on how the resulting string is composed, see Format.

Errors

In case of error, a EConvertError exception is raised.

See also

Format

  

Format a string with given arguments.

FormatBuf

  

Format a string with given arguments and store the result in a buffer.

Example

Program Example70;

{ This program demonstrates the FmtStr function }

Uses sysutils;

Var S : AnsiString;

Begin
  S:='';
  FmtStr (S,'For some nice examples of fomatting see %s.',['Format']);
  Writeln (S);
End.

Notes

 No notes exist for this page yet. 





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