[Gambas-user] Gambas equivilent help

Fabien Bodard gambas.fr at ...626...
Sun Oct 25 17:50:47 CET 2009


Private Function a( BitSet as Byte[]) as Byte[]
  Dim BitSet1 as New Byte[64]
  Dim Flag as Boolean = false
  Dim i As Integer

  For i = 0 to 64-1
    If Flag<>BitSet[i] Then BitSet1[i]=True
    Flag = BitSet[i]
  Next

return BitSet1

2009/10/25 briansykes <brisykes at ...626...>:
>
> I'm trying to convert some java code to Gambas and i cant seem to get it to
> work at all here is the code.
>
> private BitSet a(BitSet bitset)
>    {
>        BitSet bitset1 = new BitSet(64);
>        boolean flag = false;
>        for(int i1 = 0; i1 < 64; i1++)
>        {
>            if(flag != bitset.get(i1))
>                bitset1.set(i1);
>            flag = bitset.get(i1);
>        }
>
>        return bitset1;
>    }
>
>
> Benoît Minisini wrote:
>>
>>> Very simple question that i cant seem to answer on my own: What is the
>>>  gambas equivilent of the java BitSet class? is it a Byte[] array? i dont
>>>  know but thats about the only thing i could think of.
>>>
>>
>> There is no equivalent of the Java BitSet class. You must implement it by
>> your
>> own, and you can use a Byte array for that if you want.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>> ------------------------------------------------------------------------------
>> 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 at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Gambas-equivilent-help-tp26044750p26048007.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list