Module : lang.int

Module Overview

This module provides lang library operations on int values defined by the language specification 2019R2.

Functions

abs

Return absolute value of n.

fromHexString

Returns the integer that s represents in hexadecimal. Both uppercase A-F and lowercase a-f are allowed. It may start with an optional + or - sign. No 0x or 0X prefix is allowed. Returns an error if the s is not in an allowed format.

fromString

Return the integer that s represents in decimal. Returns error if s is not the decimal representation of an integer. The first character may be + or -. This is the inverse of value:toString applied to an int.

max

Maximum of all the arguments.

min

Minimum of all the arguments.

sum

Sum of all the arguments. 0 if no args

toHexString

Returns representation of n as hexdecimal string. There is no 0x prefix. Lowercase letters a-f are used. Negative numbers will have a - prefix. No sign for non-negative numbers.