Re: retrograding bits of 2.1 to 2.0 'A WORKAROUND'
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Jun 16, 1999
- 378 views
At 12:34 PM 6/16/99 -0400, you wrote: >There is no 'REVERSE' command in EU 2.0. I wish to know the way of >Shifting (i.e., reversing) the coding of... > >x = reverse(ints_to_bits(i,8)) > >into something I can use in EU 2.0 Hey Norm, You really ought to upgrade to 2.1 because it's faster and better and runs all your 2.0 stuff. Having said that, here's the reverse{} function slightly modified so that it works under 2.0. -- start code function reverse(sequence s) integer lower, n sequence t n = length(s) t = repeat(0, n) lower = 1 for upper = n to floor(n/2)+1 by -1 do t[upper] = s[lower] t[lower] = s[upper] lower = lower+1 end for return t end function -- end code Hope this helps Colin Taylor