StrToInt

From SCAR Divi Manual
Revision as of 17:17, 2 July 2011 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function StrToInt(s: string): Integer;

Availability

SCAR Divi 3.00 > Current

Description

Converts a string s to an integer, if s is not an integer the function will return -1.

Example

begin
  WriteLn(StrToInt('5'));
  WriteLn(StrToInt('a'));
end.

Output:

5
-1

See Also