Sign in Join
FPDoc Onlineexperiment

TryStrToInt function

In unit sysutils

Try to convert a string to an integer, and report on success.

Declaration

pascal
function TryStrToInt(const s: string; out i: LongInt): Boolean

Description

TryStrToInt tries to convert the string S to an integer, and returns True if this was successful. In that case the converted integer is returned in I. If the conversion failed, (an invalid string, or the value is out of range) then False is returned.

Errors

None. On error, False is returned.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.