2009/10/25 briansykes <brisy...@gmail.com>: > > Sorry i hit the wrong link, but here it is again. sorry. > > private BitSet a(char ac[]) > { > int i1 = ac.length * 8; > BitSet bitset = new BitSet(i1); > for(int j1 = 0; j1 < i1; j1++) > { > int k1 = j1 & 7; > int l1 = j1 >> 3; > if((ac[l1] & 0xff & 1 << 7 - k1) != 0) ' This is the thing i > cant understand. > bitset.set(j1); > } > > return bitset; > } > > Private Function a2(ac As String) as Byte[] > Dim i1 as Integer Dim bitset as Byte[] Dim j1 as Integer Dim l1 as Integer Dim k1 as Integer
i1 = Len(ac) * 8 bitset = New Byte[i1] For j1 = 0 To i1-1 k1 = j1 AND 7 l1 = Lsr(j1, 3) > 'If statement here if cbool(mid(ac,l1)) and $HFF and Lsl(1,7) <>0 then bitset[j1]=true > Next > Return bitset > > End > it's a try but i've not the given value.... is it a boolean string ? ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user