RosettaCodeData/Task/Binary-digits/Vedit-macro-language/binary-digits.vedit
2023-07-01 13:44:08 -04:00

17 lines
268 B
Text

repeat (ALL) {
#10 = Get_Num("Give a numeric value, -1 to end: ", STATLINE)
if (#10 < 0) { break }
Call("BINARY")
Update()
}
return
:BINARY:
do {
Num_Ins(#10 & 1, LEFT+NOCR)
#10 = #10 >> 1
Char(-1)
} while (#10 > 0)
EOL
Ins_Newline
Return