Skip to main content
Version: 7.9

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

    • int - 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