Doubly-linked list/Element definition: Difference between revisions

Line 358:
);
$node{next} = \%quux_node; # mutable</lang>
 
=={{header|PL/I}}==
<lang PL/I>
define structure
1 Node,
2 value fixed decimal,
2 back_pointer handle(Node),
2 fwd_pointer handle(Node);
 
P = NEW(: Node :); /* Creates a node, and lets P point at it. */
get (value); /* Read in a value. */
P => value; /* Assigns a value to the node we just created. */
 
/* Assuming that back_pointer and fwd_pointer point at other nodes,*/
/* we can say ... */
P = P => fwd_pointer; /* P now points at the next node. */
...
P = P => back_pointer; /* P now points at the previous node. */
</lang>
 
=={{header|Pop11}}==
Anonymous user