5 Mar
2019
5 Mar
'19
9:06 a.m.
IMHO automatic pointer initialization is agianst the Oberon spirit not to have hidden features.Anyway automatic initialization is not always a good choiche.PROCEDURE ClearList (list: List);VAR node, next: Node; (* pointers to list nodes *)BEGINnode := list.first; (* first node in list *)WHILE node # NIL DO next := node; (* do something here with node *)node := NIL;node := next;END;list.first := NIL;END ClearList;Here node and next pointers initialization is not required RegardsStefano -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon