<< Prev        Next >>

ID : 276

Bin

Function

To convert integer type data into binary string type data.

Syntax

Bin(numeric value)

Guaranteed entry

Numeric value
Designate integer type data.

Return value

Return string type data. 32 characters of "0" or "1" are output.

Description

Integer type data are converted into binary string type data.

Related Terms

Asc, Chr, SprintF, Left, Len, Mid, Right, Val, InStr, Hex, PosRy

 

Attention

Even if you designate single precision real number type data in the argument, they are automatically converted (casted) into integer type data. Single precision real number type data of I/O type should be Bit.

Example

'!TITLE "Conversion into Binary"
' Assign binary of 10 to aaa
Sub Sample_Bin

  Dim aaa As String

  aaa = Bin( 10 )

  ' Display binary of 10 (00000000000000000000000000001010) on the message output window
  PrintDbg aaa

End Sub

ID : 276

<< Prev        Next >>