Logo

Programming-Idioms

History of Idiom 76 > diff from v78 to v79

Edit summary for version 79 by programming-idioms.org:
[Perl] Variable name x

Version 78

2020-11-25, 22:56:49

Version 79

2020-11-25, 22:59:26

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Variables
s,x
Variables
s,x
Extra Keywords
int radix
Extra Keywords
int radix
Code
s = sprintf "%b", 13;
Code
$s = sprintf "%b", $x;