$Unbin: Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
No edit summary |
||
Line 1: | Line 1: | ||
<p>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.</p> | <p>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.</p> | ||
<p class="warning">Most $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $UnBin function is the [[BinaryToInteger (String function)|BinaryToInteger]] function.</p> | |||
<b>Syntax</b> | <b>Syntax</b> | ||
<p>The format of the $UNBIN function is: </p> | <p>The format of the $UNBIN function is: </p> |
Revision as of 15:49, 18 July 2013
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.
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.