RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.StrToIntDef Function

Converts a string that represents an integer (decimal or hex notation) to a number with error default.

Pascal
function StrToIntDef(const S: string; Default: Integer): Integer;
C++
int StrToIntDef(const AnsiString S, int Default);

SysUtils

StrToIntDef converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToIntDef returns Default. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!