[Gambas-user] Question on ByteArray > 63 elements
wally
wally at ...2037...
Sun Jan 26 18:03:23 CET 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StructArray_gb3_001-0.0.1.tar.gz
Type: application/gzip
Size: 5644 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140126/353f092f/attachment.gz>
More information about the User
mailing list