Path: news.daimi.aau.dk!olevi From: olevi@daimi.aau.dk (Ole Villumsen) Newsgroups: comp.lang.beta Subject: Re: Recursive, double INNER Date: 17 Feb 1995 12:57:10 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 33 Message-ID: <3i26f6$88v@belfort.daimi.aau.dk> References: <3hntel$17j@belfort.daimi.aau.dk> NNTP-Posting-Host: scandium.daimi.aau.dk I see what you mean. I think I'd prefer to pass "current" as a parameter (depending on circumstances): forAllThings: (# before:< (# current: ^someObject; enter current[] do inner; #); after:< (# current: ^someObject; enter current[] do inner; #); recursiveForAll: (# do ... foo[] -> before; ... &recursiveForAll; ... foo[] -> after; #); do &recursiveForAll; #); forAllDingbats: forAllThings (# before::< (# do ... current ... #); after::< (# do ... #); #); Alf-Ivar Holm writes: >It does solve the problem, and it looks prettier, but it may introduce >another complication because of the new block level: >If there are some variables in forAllThings that is accessible to >before and after, let us say some "current" pointer that is set before >"before". This variable is updated in recursiveForAll, but is >declared in forAllThings, to make it accessible to before and after. >Since this is a global variable to recursiveForAll, it have to be >reset before the "after" call, since some recursive call to >recursiveForAll have changed current. ... > Affi