Skip to main content
Version: 7.9

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

    • int - The integer value of the specified binary.

Examples

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