HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to DelphiVariablesData Types & ConversionOperatorsStringsConditions (if)Loops (for / while)Functions
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔄 Data Types & Conversion
IntToStr / StrToInt
✍️ String
🔁 Condition & Loop
🧩 Function & Procedure
Delphi›REFERENCE›Data Types & Conversion
🔄

Data Types & Conversion

Basic types and conversion functions.

CommandDescription
IntToStr / StrToIntNumber ↔ text conversion.

IntToStr / StrToInt

Try it yourself →

Number ↔ text conversion.

Syntax

IntToStr(number) · StrToInt(text)

Description

IntToStr converts a number to text, StrToInt converts text to a number. Comes in the SysUtils unit (uses SysUtils).

Example

program H;
{$MODE DELPHI}
uses SysUtils;
begin
  writeln(StrToInt('15') + StrToInt('27'));
end.

Expected output

42

When to use?

Ignoring input text, combining a number with text.

Common mistakes

  • ⚠️ uses SysUtils; is required for conversion functions.
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code