Hex to Int

BlockMath

Convert a hexadecimal number to an integer.

Inputs

Hexadecimal NumberRequired

Hex string to convert (without 0x).

Example: 1a

Outputs

Integer

Converted integer value.

Example: 26

Build a bot using blocks like Hex to Int

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: hex_to_int
  • Value block: it can be used directly inside expressions, e.g. "Result: " + hex_to_int(Args{...}).

Inputs

FieldInventScript nameValue
Hexadecimal Numberhexadecimal_numbere.g. "1a"

Outputs

FieldInventScript nameValue
Integerintegere.g. "26"

Example InventScript

hexToInt := hex_to_int(Args{hexadecimal_number: "1a"})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Integer: " + hexToInt})

More math blocks