Skip to main content
Version: 8.1

fromBinary

This function is used by Ignition's Expression language.

Description

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

Syntax

fromBinary(string)

  • Parameters

    • String string - A string representation of a binary.
  • Results

    • Integer - The integer value of the specified binary.

Examples

Code Snippet
fromBinary("1111") //returns 15
Code Snippet
fromBinary("-1111") //returns -15