Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!SUN.COM!wmb From: wmb@SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: Re: Multiple Stacks Message-ID: <8905251757.AA29153@jade.berkeley.edu> Date: 24 May 89 17:09:50 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Forth Interest Group International List Organization: The Internet Lines: 20 I use multiple stacks for things like floating point and a stack of open file descriptors for the input stream. The use of a memory variable for a stack pointer in these cases rarely causes any significant speed degradataion, because there is nearly always something else that is more of a bottleneck. The thing that I do worry about is error recovery. When you have multiple stacks, you should make sure that at least ABORT and perhaps also QUIT clears those other stacks. Otherwise you will have a flaky system that tends to blow up "randomly" after several ABORTs. When writing floating point code, it is wise to at least try to structure the calculation so that it doesn't matter whether or not there is a separate floating point stack. This results in code that is more portable and easier to read and maintain. It's not always possible to achieve this goal, but it's good to at least try. Mitch Bradley Bradley Forthware