ballerina/lang.int1.1.0

Module Overview

This module provides lang library operations on int values defined by the language specification 2020R1.

Functions

[7]

abs

Returns absolute value of an int.

fromHexString

Returns the integer that `s` represents in hexadecimal.

fromString

Returns the integer that `s` represents in decimal.

max

Maximum of one or more int values.

min

Minimum of one or more int values

sum

Returns sum of zero or more int values.

toHexString

Returns representation of `n` as hexdecimal string.

Constants

[11]

MAX_VALUE

Maximum value of type `int`.

MIN_VALUE

Minimum value of type `int`.

SIGNED16_MAX_VALUE

Maximum value of type `Signed16`.

SIGNED16_MIN_VALUE

Minimum value of type `Signed16`.

SIGNED32_MAX_VALUE

Maximum value of type `Signed32`.

SIGNED32_MIN_VALUE

Minimum value of type `Signed32`.

SIGNED8_MAX_VALUE

Maximum value of type `Signed8`.

SIGNED8_MIN_VALUE

Minimum value of type `Signed8`.

UNSIGNED16_MAX_VALUE

Maximum value of type `Unsigned16`.

UNSIGNED32_MAX_VALUE

Maximum value of type `Unsigned32`.

UNSIGNED8_MAX_VALUE

Maximum value of type `Unsigned8`.

Types

[6]

Signed16

Built-in subtype that allows non-negative integers that can be represented in 16 bits using two's complement.

Signed32

Built-in subtype that allows signed integers that can be represented in 32 bits using two's complement.

Signed8

Built-in subtype that allows non-negative integers that can be represented in 8 bits using two's complement.

Unsigned16

Built-in subtype that allows non-negative integers that can be represented in 16 bits.

Unsigned32

Built-in subtype that allows non-negative integers that can be represented in 32 bits.

Unsigned8

Built-in subtype that allows non-negative integers that can be represented in 8 bits.