var win := Window.Open ("position:0;0,graphics:650;max")
var i : string (1)
var num : int
loop
getch (i)
num := ord (i)
if num = 1 then
put "0000000", intstr (num, 0, 2), " " ..
elsif num = 2 or num = 3 then
put "000000", intstr (num, 0, 2), " " ..
elsif num >= 4 and num <= 7 then
put "00000", intstr (num, 0, 2), " " ..
elsif num >= 8 and num <= 15 then
put "0000", intstr (num, 0, 2), " " ..
elsif num >= 16 and num <= 31 then
put "000", intstr (num, 0, 2), " " ..
elsif num >= 32 and num <= 63 then
put "00", intstr (num, 0, 2), " " ..
elsif num >= 64 and num <= 127 then
put "0", intstr (num, 0, 2), " " ..
else
put intstr (num, 0, 2), " " ..
end if
end loop
|