I know the author's intent was to provide a high-level overview of the uses of structures and arrays, but a big piece of information is missing -- that of multidimensional structures and mixed multidimensional structures/arrays.
It's a common mistake to think that only arrays can have multiple dimensions, and that the maximum number of dimensions allowed in an array is three. This is all the documentation covers. But in fact, you can have any number of dimensions and each dimension of the complex variable can be either an array or a structure. So, you could have an array of customers, each one a structure with keys like "firstname", "lastname", etc. Furthermore, an "address" key in the customer structure could have a value that is another structure, including such keys as "street", "city", "state", "country", and "postcode".
Discussion on:
View:
Show:
Actually, I have another article is in the works that covers all of this, and specifically arrays of structures. I just came up against the space limitation that Builder has for a single article.
Thanks for reading,
Brian
Thanks for reading,
Brian
CF allows you to declare into existence arrays that are only of first normal form (from a data integrity perspective). What this means is that, just as in the example in the article, a programmer can create a 2-D array that has in essence 3 columns for one row and two for another. That's a huge no-no in every other language that I am aware of that allows you to create arrays, and for good reason. Arrays should follow certain rules to maintain data reference integrity. I am seeing here that that is not guaranteed. Granted, I am new to CF and overall I do like what I am seeing of it. Just this piece of things strikes me as being.... very unorthodox.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































