From Clomosy Docs
(Created page with " function StrToInt(IntegerString string):Integer; The StrToInt, it converts a string data (IntegerString) to an integer value.<br> '''Example:'''<br> '''var''' firstNumber,secondNumber,result : Integer;<br> '''begin'''<br> firstNumber := StrToInt('100'); secondNumber := StrToInt('200'); result := firstNumber + secondNumber;<br> ShowMessage('Result : '+IntToStr(result));<br> '''end;''' '''Output:'''<br> Result : 300") |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | |||
function StrToInt(const S: string):Integer; | |||
</div> | |||
The StrToInt, it converts a string data ( | The StrToInt, it converts a string data (S) to an integer value.<br> | ||
<b>Example</b><br> | |||
''' | <pre> | ||
var | |||
firstNumber,secondNumber,result : Integer; | |||
{ | |||
firstNumber = StrToInt('100'); | |||
secondNumber = StrToInt('200'); | |||
result = firstNumber + secondNumber; | |||
ShowMessage('Result : '+IntToStr(result)); | |||
} | |||
</pre> | |||
<b>Output:</b><br> | |||
<div class="alert alert-success" role="alert" data-bs-theme="light"> | |||
Result : 300 | |||
</div> | |||
<h2> See Also </h2> | |||
* [[System_Library#Type_Conversion_Functions | Type Conversion Functions]] | |||
{{#seo:|title=StrToInt Using in Clomsy - Clomosy Docs}} | |||
{{#seo:|description=Use the StrToInt function in Clomosy to convert string data into an integer, enabling arithmetic operations with ease.}} | |||
Latest revision as of 14:36, 24 December 2024
function StrToInt(const S: string):Integer;
The StrToInt, it converts a string data (S) to an integer value.
Example
var
firstNumber,secondNumber,result : Integer;
{
firstNumber = StrToInt('100');
secondNumber = StrToInt('200');
result = firstNumber + secondNumber;
ShowMessage('Result : '+IntToStr(result));
}
Output:
Result : 300