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

SScanf

Scan a string for substrings and return the substrings

Declaration

Source position: sysstrh.inc line 227

function SScanf(

  const s: String;

  const fmt: String;

  const Pointers: array of Pointer

):Integer;

Description

SSCanF scans the string S for the elements specified in Fmt, and returns the elements in the pointers in Pointers. The Fmt can contain placeholders of the form %X where X can be one of the following characters:

d
Placeholder for a decimal number.
f
Placeholder for a floating point number (an extended)
s
Placeholder for a string of arbitrary length.
c
Placeholder for a single character

The Pointers array contains a list of pointers, each pointer should point to a memory location of a type that corresponds to the type of placeholder in that position:

d
A pointer to an integer.
f
A pointer to an extended.
s
A pointer to an ansistring.
c
A pointer to a single character.

Errors

No error checking is performed on the type of the memory location.

See also

Format

  

Format a string with given arguments.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.