The code is intended as a skeletal structure. You can adapt it to link items in non-standard ways. Indeed, the given code implements circular lists which are not built-in to Blitz.
Another point is that the code shows how easy it is to determine the addresses of items in a list. A subset of these could then be stored in a separate array (or list) to provide direct access to the start of sub-lists within the main list.
Also, the links can easily be altered at runtime, which means (for example) that the list (or any subset of it) could be sorted first by one field and then later on by a different field, simply by appropriately rewriting the contents of the link fields. This could (for example) be a useful way of rearranging the visibility z-order of a large list of objects from various viewpoints.
My incentive for producing the code was to make it easier for me to convert some C programs in my possession to BlitzPlus. These programs make heavy use of list-like data structures which did not map easily to Basic code.
Anthony Jordan
Another point is that the code shows how easy it is to determine the addresses of items in a list. A subset of these could then be stored in a separate array (or list) to provide direct access to the start of sub-lists within the main list.
Also, the links can easily be altered at runtime, which means (for example) that the list (or any subset of it) could be sorted first by one field and then later on by a different field, simply by appropriately rewriting the contents of the link fields. This could (for example) be a useful way of rearranging the visibility z-order of a large list of objects from various viewpoints.
My incentive for producing the code was to make it easier for me to convert some C programs in my possession to BlitzPlus. These programs make heavy use of list-like data structures which did not map easily to Basic code.
Anthony Jordan