[↑]
SmileBASIC4 Replica Reference
BIN$
Convert a numeric value to a binary string

BIN$(NumericValue[,NumberOfDigits])

Arguments

NumericValue

Numeric value to convert to a binary string

・If a Real is specified, the decimal part is rounded toward zero.

NumberOfDigits

Number of digits with the a binary string to be output: 0 to 32

・If a value of 1 or more is specified, a string with placing 0 at the beginning is returned.
・When 0 is specified, 0 is not placed at the beginning.
・0, if not specified.

Return Value

Conversion result binary string

Example

S$=BIN$(65535,16)
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|