Skip to content

Category Converting Data Types

Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › All Categories › Converting Data Types

Converting Data Types

Grouped by task. Numbers and math lists them beside the rest of the area.

Convert between number types

Function What it does From
CInt Converts a number or string to an Integer, rounding to the nearest; no overflow check. built-in
CUInt Converts a number or string to a UInteger, rounding to the nearest; no overflow check. built-in
CByte Converts a number or string to a Byte, rounding to the nearest; no overflow check. built-in
CUByte Converts a number or string to a UByte, rounding to the nearest; no overflow check. built-in
CShort Converts a number or string to a Short, rounding to the nearest; no overflow check. built-in
CUShort Converts a number or string to a UShort, rounding to the nearest; no overflow check. built-in
CLng Converts a number or string to a 32-bit Long, rounding to the nearest; no overflow check. built-in
CULng Converts a number or string to a 32-bit ULong, rounding to the nearest; no overflow check. built-in
CLngInt Converts a number or string to a 64-bit LongInt, rounding to the nearest. built-in
CULngInt Converts a number or string to a 64-bit ULongInt, rounding to the nearest. built-in
CDbl Converts a number or string to a Double. built-in
CSng Converts a number or string to a Single. built-in
CBool Converts a number, or the text "true" or "false", to a boolean; zero gives false. built-in
Cast Converts a value to any named type, such as Cast(Byte, flag). built-in
CPtr Converts a pointer or an integer to the given pointer type. built-in
CSign Converts an unsigned value to signed, so division and shifts treat it as signed. built-in
CUnsg Converts a signed value to unsigned, so division and shifts treat it as unsigned. built-in

Convert between numbers and text

Function What it does From
Str Returns a number or boolean as text. built-in
WStr Returns a number as a wide string. built-in
Val Converts text to a double. built-in
ValInt Converts text to a 32-bit integer. built-in
ValLng Converts text to a 64-bit integer. built-in
ValUInt Converts text to an unsigned 32-bit integer. built-in
ValULng Converts text to an unsigned 64-bit integer. built-in

Also in this category


Home · Keyword Index

Clone this wiki locally