[Gambas-user] Struct with Array Field

T Lee Davidson t.lee.davidson at gmail.com
Wed Apr 5 16:54:17 CEST 2023


On 4/5/23 10:57, Mayost Sharon wrote:
> first thanks
> 
> Is it supposed to be like this?
> For each field that is an array I will have to say NEW separately
> 
> The fields are inside a Struct
> I thought that if I do NEW to Struct
> This will do it on all fields
> 
> Thanks

Simple native datatypes (such as String, Integer, Boolean) will be automatically initialized. But, objects (such as String[], 
Integer[], Boolean[]), which are objects of classes and have properties and methods, must be initialized with the NEW keyword.


-- 
Lee



More information about the User mailing list