Skip to content

TSmallIntHelper.TryParse

Try to convert a string to a SmallInt, report success or failure

Declaration

Source position: syshelph.inc line 443

public 
  class function TryParse(const AString: string; out AValue: SmallInt)
                          : Boolean;  Static;

Description

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

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

See also

Name Description
Val Calculate numerical/enumerated value of a string.
TSmallIntHelper.Parse Convert from a string