Skip to content

TWordHelper.Parse

Convert from a string.

Declaration

Source position: syshelph.inc line 980

public 
class function TWordHelper.Parse(const AString: string) : Word;  static;

Description

Parse will attempt to convert the string AString to a Word value. It uses the StrToInt function to perform the conversion, so no localization is taken into account.

Errors

If the string does not contain a valid Word value, an EConvertError exception is raised.

See also

Name Description
TWordHelper.ToString Convert the value to string.
TWordHelper.TryParse Try to convert a string to a Word, report success or failure.
StrToInt Convert a string to an integer value.