"Integer8" (Compiled Type)

"Integer8"

represents an 8-bit machine integer atomic type specifier.

Details

  • "Integer8" can be used in Typed and related constructs to specify a type.

Properties

  • Values held by "Integer8" range from -27 to 27-1.

Conversions

    From Expressions

  • Suitably sized Integer expressions can be converted into compiled code elements with the type "Integer8".
  • To Expressions

  • "Integer8" compiled elements can be converted into Integer expressions.
  • Arithmetic

  • "Integer8" compiled elements are automatically promoted to real or complex elements when they are combined in binary arithmetic operations.
  • "Integer8" compiled elements are automatically promoted to larger integral elements when they are combined in binary arithmetic operations.
  • "Integer8" compiled elements are automatically promoted to "UnsignedInteger8" elements when they are combined in binary arithmetic operations.

Runtime Errors

    Overflow

  • "Integer8" can give a runtime error if it is used in an operation that overflows.

Examples

Basic Examples  (3)

"Integer8" can be used as an input and output from a CompiledCodeFunction:

An overflow causes an error while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:

The "Integer8" argument is automatically promoted when combined with a real number:

The "Integer8" argument is automatically promoted when combined with an integer of a larger storage size:

The "Integer8" argument is automatically promoted when combined with an unsigned integer of the same storage size: