Sign in Join
FPDoc Onlineexperiment

TIntegerHelper.TryParse function

Member of TIntegerHelperpublicIn unit sysutils

Try to convert a string to a Integer, report success or failure.

Declaration

pascal
class function TryParse(const AString: string; out AValue: Integer)
: Boolean; static

Description

TryParse attempts to convert the string AString to a Integer, and reports the success of the attempt. If the attempt is successful, then True is returned, and the actual value of the Integer is returned in AValue.

It uses the val function to perform the conversion, so no localization is taken into account.

See also

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