List Commands Library for 50g
|
07-14-2017, 10:41 PM
Post: #44
|
|||
|
|||
RE: List Commands Library for 50g
(07-14-2017 08:20 PM)Gilles59 Wrote: Hi David, This was actually intentional, and now that I'm checking on it I see that I was mistakenly assuming that I was mimicking the inherent behavior of the built-in commands by protecting the stack. This is clearly not the case. Where did I get the impression that the list commands worked this way? I'm not sure. Thanks for pointing this out! The only consequence I can think of by not protecting the stack in this way is that it means that the user-supplied program should never delete any of the pre-existing stack elements. I've checked DOLIST/DOSUBS, and they apparently just notate the stack depth at the beginning of the command and assume that anything greater goes into the final result list. If the user-program deletes pre-existing stack objects, the grouped result doesn't include the same number of initial objects placed on the stack by the user program. In other words, if the user program deletes 3 pre-existing stack objects, then the first 3 objects in the result will be on the stack but not in the result list when DOLIST/DOSUBS completes. I could easily replicate that behavior with DOPERM and DOCOMB. An example of what I'm referring to: Code: \<< |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)