[Gambas-user] Issues when writing and reading structures

T Lee Davidson t.lee.davidson at gmail.com
Tue Mar 21 23:01:33 CET 2023


On 3/21/23 15:57, Brian G wrote:
> When a structure containing a string is written the first byte is the length
> But when it is read back as the structure it does not use the length byte but does include the len byte  into the string field.
> I am not sure if this is correct or not.
> 
> p.s. is it possible to have varptr return the memory address of the structure as you can assign a pointer to a structure object.
> 
> Is this correct or is it a bug, not sure? But I would like to send structured data to another client and recieve it on that side
> the follow script demonstrates:
> 
[code snipped]
> 
> 
> "Failure is the key to success;
>   each mistake teaches us something"  .. Morihei Ueshiba
> Brian G

When I try to run that code in the IDE, I get a SegFault at:
   Write #f, a As Variant


-- 
Lee



More information about the User mailing list