[Gambas-user] Question on ByteArray > 63 elements

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 27 17:22:04 CET 2014


I don't quite understand the problem. If the data is from device, then why
number of parameters matter?
The limit only applies when the data is written by hand directly to source
code. You don't read it from stream/memory?

Yes, you can put the values to string like this "1, 2, 3, ... , 63, 64, 65"
and use Split() and CByte() to convert them to your array.

Jussi


On Mon, Jan 27, 2014 at 1:59 AM, Jussi Lahtinen <jussi.lahtinen at ...626...>wrote:

> No, you got me wrong... 64 is limit of arguments, so split it in two set
> of arguments.
>
> GG.src.Insert([1,2,3,4, ... ])
> GG.src.Insert([ ... 63, 64, 65])
>
>
> Jussi
>
>
>
> On Sun, Jan 26, 2014 at 10:59 PM, wally <wally at ...2037...> wrote:
>
>> Hi Jussi,
>>
>> still "too many arguments"
>>
>> I do something wrong, incedible a 63 limit for Byte[]
>>
>> GG.src.Insert([1,2,3,4, ... , 64, 65])
>>
>>
>> wally
>>
>> On 01/26/2014 08:40 PM, Jussi Lahtinen wrote:
>> > Example:
>> > GG.src.Insert([1,2,3,4])
>> >
>> > Jussi
>> >
>> >
>> > On Sun, Jan 26, 2014 at 7:03 PM, wally <wally at ...2037...> wrote:
>> >
>> >> Hello,
>> >>
>> >> i need to write more than 63 Bytes to an Byte[] in a structure.
>> >>
>> >> How to do this job ?
>> >>
>> >> mini example attached
>> >>
>> >>
>> >> thank you wally
>> >>
>> >> '##########################################################
>> >>
>> >>
>> >> ' Gambas class file
>> >>
>> >> Public Struct myStruct
>> >>      src As Byte[]
>> >>      dst As Byte[]
>> >> End Struct
>> >>
>> >> Public GG As New MyStruct
>> >>
>> >> Public Sub Button1_Click()
>> >>
>> >> GG.src = New Byte[]
>> >>
>> >> GG.src.Resize(200)
>> >> GG.src.Fill(&hFF, 0, -1)
>> >>
>> >> Print GG.src.Length
>> >> GG.src.Clear
>> >> Print GG.src.Length
>> >>
>> >> GG.src = [&Haa, &H25, &H00, &H01, &H0a, &H00, &H00, &H00, &H00, &H0f,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H00, &He0, &H93, &H04, &H00, &Hf4, &H53,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H00, &He0, &H93, &H04, &H00, &Hf4, &H53,
>> >>            &H00, &H00, &H00]              'Max = 63 !!?
>> >>
>> >>
>> >> Print GG.src.Length      'OK
>> >>
>> >>
>> >> GG.src = [&Haa, &H25, &H00, &H01, &H0a, &H00, &H00, &H00, &H0f, &Hf0,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H00, &He0, &H93, &H04, &H00, &Hf4, &H53,
>> >>            &H00, &H00, &H00, &H00, &He0, &H93, &H04, &H00, &Hf4, &H53,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H02, &H00, &H0d, &H06, &H00, &H10, &H00,
>> >>            &H00, &H00, &H00, &H00, &He0, &H93, &H04, &H00, &Hf4, &H53,
>> >>            &H00, &H00, &H00]              'Max = 63 !!?
>> >>
>> >> Print GG.src.Length      'Too many arguments !!
>> >>
>> >>
>> >> End
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> >> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> >> Critical Workloads, Development Environments & Everything In Between.
>> >> Get a Quote or Start a Free Trial Today.
>> >>
>> >>
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> >> _______________________________________________
>> >> Gambas-user mailing list
>> >> Gambas-user at lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>
>> >>
>> >
>> ------------------------------------------------------------------------------
>> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> > Critical Workloads, Development Environments & Everything In Between.
>> > Get a Quote or Start a Free Trial Today.
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > Gambas-user mailing list
>> > Gambas-user at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>>
>>
>>
>> ------------------------------------------------------------------------------
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> _______________________________________________
>> 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