Skip to main content
Version: 8.1

fromHex

This function is used by Ignition's Expression language.

Description​

Returns an integer value of the hex formatted string argument. Numbers outside of the range (-231) - (231-1), and strings that are not hex numbers, return null.

Syntax​

fromHex(string)

  • Parameters

    • String string - A string representation of a hex value.
  • Results

    • Integer - The integer of the hex value.

Examples​

Code Snippet
fromHex("ff") //returns 255
Code Snippet
fromHex("0xff") //returns 255
Code Snippet
fromHex("-ff") //returns -255