Binary digits: Difference between revisions
Content added Content deleted
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
No edit summary |
||
Line 2,086: | Line 2,086: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
<syntaxhighlight lang="text"> |
<syntaxhighlight lang="text"> |
||
func to2 n . r$ . |
|||
if n > 0 |
if n > 0 |
||
call to2 n div 2 r$ |
call to2 n div 2 r$ |
||
r$ &= n mod 2 |
|||
r$ &= "0" |
|||
else |
|||
r$ &= "1" |
|||
. |
|||
else |
else |
||
r$ = "" |
r$ = "" |
||
Line 2,101: | Line 2,098: | ||
call to2 n r$ |
call to2 n r$ |
||
if r$ = "" |
if r$ = "" |
||
r$ = "0" |
|||
else |
|||
⚫ | |||
. |
. |
||
⚫ | |||
. |
. |
||
call pr2 5 |
call pr2 5 |
||
call pr2 50 |
call pr2 50 |
||
call pr2 9000 |
call pr2 9000 |
||
</syntaxhighlight> |
|||
<pre> |
<pre> |
||
Line 2,115: | Line 2,112: | ||
10001100101000 |
10001100101000 |
||
</pre> |
</pre> |
||
=={{header|EchoLisp}}== |
=={{header|EchoLisp}}== |
||
<syntaxhighlight lang="scheme"> |
<syntaxhighlight lang="scheme"> |