$Unbin: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (Mlarocca moved page $UNBIN to $Unbin: Lower case change)
 
(No difference)

Latest revision as of 15:25, 31 July 2014

The $UNBIN function converts a value from its fixed-point binary form to the corresponding character string representation. The $UNBIN function reverses the effect of the $BINARY function.

Note: Most $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $UnBin function is the BinaryToInteger function.

Syntax

The format of the $UNBIN function is:

$UNBIN(value [,scale] )

where:

  • value is a string argument. This argument must be either two or four bytes long; its value is interpreted as a bit string. If the length of the argument is not two or four bytes, Model 204 issues a counting error message and returns a null string.
  • scale indicates the number of fractional digits (bits) in the specified value. If the scale argument is omitted, a default value of 0 (integer) is used.

For $UNBIN the useful range for scale seems to be about 0-38 or 0-42, depending on the value of the first parameter.