Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"REBOOL Valid_Tuples()" => return TRUE or FALSE
The Valid_Tuples routine in the image code said it returned a REBOOL but actually was returning an integer. Its confusing name had it actually returning an index > 0 if there were invalid tuples... and further it's not that the tuple is invalid, but that something that isn't a tuple is in the list. Further adding to the problems, the routine was enumerating from the index of the block value it was holding up to the length *adjusted with the index subtracted out*. This is made more apparent by the name VAL_LEN_AT (now distinct from VAL_LEN_HEAD). As a result it would not be checking the values fully from the index forward, but fewer if the index was nonzero. Adding further confusion to the mix, the passed back index was used to add to the value of the block passed in, in one case... as opposed to indexing within the block. Hence an index of its children was being used to index into its siblings. The good news is that the new macro stylings make this much clearer and easier to grasp. The replacement function returns a TRUE or FALSE, and is named "Array_Has_Non_Tuple". The index is an out parameter and is a zero-based child index.
- Loading branch information