Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!intelhf!agora!parsely!psueea!pdxgate!eecs!marcus From: marcus@eecs.cs.pdx.edu (M. Daniels) Newsgroups: comp.lang.perl Subject: vec problems Summary: using large vectors, can't extract bits of any size but 1 Message-ID: <10@pdxgate.UUCP> Date: 30 Aug 90 07:34:18 GMT Sender: news@pdxgate.UUCP Distribution: comp Lines: 20 I am using a large vector (from 860-1200 bits) as a key to an associative array (its a simple way to find unique records). Anyway, what I want to do is take the length of the vector and find the first active bit (so larger vectors of the same value can be compared). If I do a for loop down from 8*length($vec) to 0, stopping when vec($vec,$x,1)!=0 everything works great, but it seems like it would be better to go by 8s. However, when I do this, vec only returns zeros. huh? I'm sure this is really obvious. The docs say BITS must be a power of 2 from 1 to 32, but 8 is. thoughts, anecdotes, anything? thanks marcus daniels ------------------------------------------------------------------------------- - MD - marcus@eecs.ee.pdx.edu OR ....!uunet!tektronix!psueea!eecs!marcus - MD - "An empty stomach is not a good polotical advisor." -------------------------------------------------------------------------------