Post Reply 
HP50g ram and working dir.
08-20-2017, 08:51 PM
Post: #13
RE: HP50g ram and working dir.
(08-20-2017 10:15 AM)pier4r Wrote:  Ok so I have a directory in port 1. I save it with
<DIR object on the stack>
'dirName' 1 \->TAG STO


I can recall elements with
{dirName varName} 1 \->TAG RCL

But how do I list the directory variables?

Short answer: You don't. Port-tagged path access is intended to be used when you already know what's in a directory because you created it. If you need to go exploring, use the Filer.

Longer answer: There's no simple built-in way (like PVARS) to list the variables in a directory stored in a port. You'd have to write a program to do that. Here's a possibly helpful System RPL program that explodes a directory object onto the stack. Recall the directory onto level 1, then run this program, and the directory's contents will be exploded onto the stack, with each variable's contents occupying one stack level and its name on the level below it. A number is left on level 1, indicating how many variables were in the directory.

Code:
::
  CK1NoBlame
  CK&DISPATCH2
  BINT47
  ::
    BINT0
    SWAPOVER
    BEGIN
    ?ATTNQUIT
    NEXTRRPOB
    WHILE
    ::
      DUP
      TOTEMPOB
      SWAP
      RAM-WORDNAME
      5ROLL
      #1+
      5ROLL
      5ROLL
    ;
    REPEAT
    DROP
    UNCOERCE
  ;
;

BYTES: 65.0, #86D2h

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP50g ram and working dir. - pier4r - 08-16-2017, 01:55 PM
RE: HP50g ram and working dir. - pier4r - 08-17-2017, 07:16 AM
RE: HP50g ram and working dir. - pier4r - 08-18-2017, 08:11 PM
RE: HP50g ram and working dir. - pier4r - 08-19-2017, 06:20 AM
RE: HP50g ram and working dir. - Joe Horn - 08-19-2017, 06:51 AM
RE: HP50g ram and working dir. - pier4r - 08-19-2017, 09:54 AM
RE: HP50g ram and working dir. - pier4r - 08-18-2017, 09:36 PM
RE: HP50g ram and working dir. - pier4r - 08-20-2017, 10:15 AM
RE: HP50g ram and working dir. - Joe Horn - 08-20-2017 08:51 PM
RE: HP50g ram and working dir. - pier4r - 08-20-2017, 07:29 PM
RE: HP50g ram and working dir. - pier4r - 08-20-2017, 10:23 PM
RE: HP50g ram and working dir. - Joe Horn - 08-21-2017, 02:15 AM
RE: HP50g ram and working dir. - pier4r - 08-21-2017, 05:56 AM
RE: HP50g ram and working dir. - pier4r - 08-21-2017, 08:15 AM



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