Post Reply 
Summing lists in directory structure
09-19-2017, 02:35 PM
Post: #18
RE: Summing lists in directory structure
(09-19-2017 08:38 AM)brickviking Wrote:  Oh yay. That could be a bit of a problem if I needed to trace without having understood which commands can't be traced into.

As a general rule, the inner workings of individual RPL commands can't be traced into. SSTing them simply executes the command and then stops when they are complete. Note that when you use a command like DOLIST or DOSUBS, the "user program" is an argument that you are passing to it. It doesn't actually get executed until the command itself invokes it within the confines of its processing of the list(s). So when you are stepping through your code with the debugger, the user program is simply being added to the stack when encountered as opposed to being executed. Execution of your program happens "inside" the DOLIST/DOSUBS invocation.

In some cases (notably with EVAL), a user program passed as an argument can be stepped through. You would simply need to insert "41 MENU HALT" at the point you wish the code to break. This is important if you use what is perhaps the most common method of deploying subroutines in a self-contained UserRPL program (storing the subroutine in a local, then executing it with "<local> EVAL").

Unfortunately HALT would wreak havoc with the inner workings of DOLIST/DOSUBS, so it can't be used in that context.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summing lists in directory structure - DavidM - 09-19-2017 02:35 PM



User(s) browsing this thread: 1 Guest(s)