[Gambas-user] Gambas equivilent help
Fabien Bodard
gambas.fr at ...626...
Sun Oct 25 23:30:54 CET 2009
2009/10/25 briansykes <brisykes at ...626...>:
>
> 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 ?
More information about the User
mailing list