Difference between revisions of "ScriptCore3.StrToInt"
(new page) |
(No difference)
|
Revision as of 16:27, 12 August 2013
function StrToInt(Text: String): Integer Text: string that is to be converted into a number Result: conversion result
Description
This converts a string into a number.
Example
var
MyStr: string;
MyInt: integer;
begin
MyStr := '1';
MyInt := StrToInt(MyStr); // this will work
MyStr := '-1';
MyInt := StrToInt(MyStr); // this will work
MyStr := '1.00';
MyInt := StrToInt(MyStr); // this will NOT work
MyStr := '1ab2c';
MyInt := StrToInt(MyStr); // this will NOT work
end;