[Gambas-user] Which way of storing these data would you choose?
T Lee Davidson
t.lee.davidson at gmail.com
Mon Dec 9 19:12:18 CET 2019
On 12/9/19 12:19 PM, Rolf-Werner Eilert wrote:
> The second idea was to have a number of arrays for each declaration, having a name like the value and a datatype which fits the
> data. The values for each declaration could be referenced via one pointer to all arrays. The drawback would be, I would have
> more than a dozen single arrays which I would have to maintain each time.
It sounds like perhaps you want an array of collections (Collection[]). Values in a collection are variant.
["name": "paragraph1", "indentation": 4, "justification": "left", "font": "sans-serif", "size": 12]
Dim MyCollection as New Collection[]
Paragraph one could be MyCollection[0], paragraph two, MyCollection[1], etc. This assumes, though, that the paragraphs would
have a related context, ie. be in the same document.
--
Lee
More information about the User
mailing list