Bill Allombert on Sun, 15 Jun 2003 19:12:08 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Binary |
On Sat, May 31, 2003 at 12:09:40PM +0100, Jon Perry wrote: > Two points; > > 1. > > ? a > %1 = a > ? binary(a) > *** incorrect type in binaire. What is the problem ? You would prefer *** incorrect type in binary or you expected something else ? > Is it possible to force the binary function to return a vector of length n, > > e.g. binary(7,4) = [0,1,1,1] Not currently but you can do: ? binary2(x,n)=vecextract(binary(bitor(x,1<<n)),(1<<(n+1))-2) Cheers, Bill.