# Function Reference

BinaryString

Returns the BinaryString representation of an expression.

BinaryString( expression )

Parameters

expression | An expression to convert into a BinaryString.

Return Value

Returns a BinaryString.

Remarks

Maximum binarystring length is 2147483647 bytes.
This function is not a conversion function returning a string of binary digits. BinaryString(10) does not return "10" but a BinaryString which 4 digits long which is equivalent to 0x0A000000.

Related

Int, Number, IsString, String, IsBinaryString

Example

;example1
$var = BinaryString(10)
;$var is the binaryString "
msgbox(0, "Test Binary", $var)
$str = String($var)
;$var is the binaryString "
msgbox(0, "Test BinaryString", $str)
;example2
$bin= "a" & chr(0) & "b"
$s=String($bin)
$bin1= BinaryString($s)
if $bin= $bin1 then msgbox(0,"no conversion loss", $s)