Logo

Programming-Idioms

History of Idiom 76 > diff from v71 to v72

Edit summary for version 72 by programming-idioms.org:
New Fortran implementation by user [programming-idioms.org]

Version 71

2020-11-25, 22:08:22

Version 72

2020-11-25, 22:09:34

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
write (unit=s,fmt='(B32)') x
Comments bubble
Pads with zeros