Re: Sequence items to a single number ? How to achieve ?
- Posted by WJ1N Feb 04, 2011
- 1238 views
This is a somewhat different method
include std/convert.e integer d = 13 --your decimal number sequence b = {} b = reverse(int_to_bits(d)) b = b[find(1,b)..$] puts(1,"{") for i = 1 to length(b) do printf(1,"%d",b[i]) if i != length(b) then puts(1,",") end if end for puts(1,"}")