XbZ_Num2Binary()
Previous  Top  Next

XbZ_Num2Binary() - Convert a Number to its Binary representation.

Syntax

XbZ_Num2Binary(<nValue>,  
              [<nLen>]) --> cDisplay  

Parameters

<nValue>  
<nValue> contains the Numeric Value that should be converted to a string in Binary Format.  

<nLen>  
<nLen> optionally contains the Number of Digits that should be displayed.  

Returns

This function returns a formatted string that shows the Binary representation of <nValue>.  

Description

This function returns a formatted string that shows the Binary representation of <nValue>. If <nLen> is specified, the returned value is either padded on the left with Zeros ("0") or truncated to only contain <nLen> digits.  

Example

QOut(XbZ_Num2Binary(123, 8)) --> "01111011"