On Fri, 31 Jan 2003 10:27:22 -0600, mneme-Xhj3G7Rj6JI@xxxxxxxxxxxxxxxx wrote:
>$db=do_tree($db);
>sub do_tree ($) {
> $node->[1]=do_tree($node->[1])
> $node->[2]=do_tree($node->[2])
That prototype isn't doing you any good. Turning on warnings reveals:
main::do_tree() called too early to check prototype at mneme line 41.
main::do_tree() called too early to check prototype at mneme line 43.
main::do_tree() called too early to check prototype at mneme line 14.
For the recursive calls at lines 41 and 43 to apply the prototype,
you need a declaration: sub do_tree($); before the sub definition.
For the call at line 14, put either the declaration or the the
definition earlier.
|