home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!pitt!willett!dwp
- From: dwp@willett.pgh.pa.us (Doug Philips)
- Newsgroups: comp.lang.forth
- Subject: What is the return stack for? (was: What should the Standard include?)
- Message-ID: <3938.UUL1.3#5129@willett.pgh.pa.us>
- Date: 23 Jul 92 20:52:02 GMT
- Organization: EIEI-U
- Lines: 30
-
- In article <3915.UUL1.3#5129@willett.pgh.pa.us>
- B.RODRIGUEZ2 [Brad] writes:
- +I don't use '&' inside DO..LOOPs, just as I don't factor 'I' or 'J' into words
- +which are used within DO..LOOPs. Just one more of those things you have to
- +learn to live with.
-
- Pardon me for being confused here. Aren't I and J are effectively local
- variables to the DO LOOP 'block' in which they occur? If so then it makes
- sense that they cannot be "factor"ed in the manner you suggest. Personally,
- I find DO LOOPS to be egregiously restrictive for other reasons.
-
- +Apologies for unclarity in my previous posting: all I need is your #R>, to
- +drop a given number of items from the return stack. (Actually, I need to "pop"
- +the RP to a previously saved position, which would require RDEPTH as well as
- +#R>.) But I still need on other occasions to move return stack items to and
- +from the parameter stack, and preserve their meaning.
-
- I think one of the "problems" with return stack "entitlements" is that
- the return stack is used for more than just "get me back to my invoking
- word" information, _and_ that the return stack is not typed. So, even
- if you are given the size in cells of "return addresses", you still don't
- know if there are other items on the return stack. Although DO LOOP
- (and perhaps CASE ENDCASE I don't recall) are known to muddle the
- return stack, the mere existance of >R R> means that the user is
- free to diddle the return stack, and therefore you simply can't know what
- is "really" on it.
-
- -Doug
- ---
- Preferred: dwp@willett.pgh.pa.us Ok: {pitt,sei}!willett!dwp
-