Lhogho
0.0.027
|
Lists are chains of atoms (including sublists). List atoms are actually the nodes which connect other atoms (called list elements).
Every list node keeps track of the data atom associated with the node and the next node of the chain. List atoms are used to represent Logo lists [...]. The number of nodes in a list is limited only by the available memory. Use IS_LIST() macro to check whether the atom is list node. Lists for which the FLAG_EXPRESSION flag is set are considered as expressions and are printed framed in parentheses
(...).
Use IS_LIST() macro to check whether the atom is a list node. Use IS_EMPTY() and IS_NOT_EMPTY() to check whether a list is (or is not) the empty list. Use CAR() to get the atom associated with te node and CDR() to get the next node of the list.
Some list atoms use larger blocks. These list atoms have their FLAG_EXTENDED_NODE. Use IS_EXTENDED() macro to check for such atoms. The first 16 bytes of an extended atom have the same structure as the notmal list atoms. The extra pointer can be access with the POS() macro. The info node for each sublist is an extended list atom. Its POS() points to a subword containing the source of the sublist including initial [ and final ]. This can be used for reporting errors at the correct position.
List atoms have bitmask flags which provides additional information about the data node. The following flags are used for data nodes containing words and subwords: