LB Booster
Programming >> Liberty BASIC language >> arrays of structures http://lbb.conforums.com/index.cgi?board=lblang&action=display&num=1478456432 arrays of structures
Post by Alincon on Nov 6th, 2016, 5:20pm
More browsing of LBB documentation (new features):
What can be done with arrays of structures? I've only seen individual structures used for sending/receiving parameters. Could an array of structures be used with file I/O?
r.m.
Re: arrays of structures
Post by Richard Russell on Nov 6th, 2016, 7:34pm
Commonly used with CALLDLL, because there are some Windows API functions that take an array of structures as a parameter. One, GdipGetPropertyItem, came up recently in the 'Displaying animated GIFs' thread; amongst several others are CreateAcceleratorTable and GetCharABCWidths.
But you could certainly use an array of structures independently of CALLDLL. Any time you have a set of 'things', each of which is well described by a struct, the entire set can be represented as an array of structs.
Something to bear in mind, though, is that you cannot REDIM an array of structures so you need to create it initially as large as you'll need in that run of the program.