home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gumby!wupost!waikato.ac.nz!fee
- From: fee@waikato.ac.nz
- Newsgroups: comp.sys.hp48
- Subject: Re: sys_RPL EVAL??? and DEBUGer ???
- Message-ID: <1992Nov6.085639.11983@waikato.ac.nz>
- Date: 6 Nov 92 08:56:39 +1300
- References: <1992Nov5.093538.11956@waikato.ac.nz> <MHEISKAN.92Nov5011224@lk-hp-21.hut.fi>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 60
-
- In article <MHEISKAN.92Nov5011224@lk-hp-21.hut.fi>, mheiskan@snakemail.hut.fi (Mika Heiskanen) writes:
- >
- > In article <1992Nov5.093538.11956@waikato.ac.nz> fee@waikato.ac.nz writes:
- >>What is the sys_RPL command that will evaluate an object on the stack?
- >>eg: given a secondary which has been pulled out of a list of other
- >>secondaries, what command actually evaluates the secondary?
- >
- >>I want:
- >> 1:{<< "success" >>} ---> 1:<< "success" >>
- >
- >>then:
- >> 1:<< "success" >> ---> 1: "success"
- >
- >>but I can only get to the left-hand expression on the second line
- >>using sys_RPL.
- >
- [stuff deleted]
- >
- > Thus use COMPEVAL for the list.
- >
- > --> mheiskan@vipunen.hut.fi
-
- Thanks Mika. However I tried your solution but to no avail. COMPEVAL
- appears to work in exactly the same way as (user) EVAL but it seems
- for my problem, that it has to be executed twice. I wrote a sys_RPL routine
- containing only COMPEVAL in it to try this.
-
- There is a catch. If I try COMPEVAL on a secondary or a secondary enclosed
- in a list all of which was written from the keyboard - no problem. COMPEVAL
- evaluates the secondary in one step.
-
- However, the original secondary needs two COMPEVAL's to evaluate it, with
- the first COMPEVAL apparently thinking for a bit and leaving the stack (at
- least the display) unchanged. A second COMPEVAL will evaluate the secondary.
-
- My secondary was created in the sys_RPL routine by adding strings
- together (including the << and >> symbols) and then "palparse"'d to create
- the secondary and then place it in a list. If I do an OBJ-> then DROP the
- flag, the secondary still requires two COMPEVALs or EVALs. However, doing
- a TYPE on the secondary immediately after the OB-> DROP returns an 8,
- signifying that it is a secondary. Why does it require two COMPEVALs then?
- It seems almost as if the object has to go through some kind of operation
- at least once before it can be evaluated. Has it got some kind of weird
- garbage attached that the HP is removing the first time around?
-
- [By the way, if I include two COMPEVALs in a sys_RPL routine - the HP doesn't
- like it. The stack is cleared and I am returned to the MTH menu, almost
- like a warm start, but without reattaching the libraries. So two COMPEVALs
- isn't the answer - it needs two single COMPEVAL operations.]
-
- Still confused.
- Conan.
- --
- -----------------------------------------------------------------
- Conan J. Fee _ fee@waikato.ac.nz
- Centre for Technology (_)o
- University of Waikato, Hamilton /\ \ Phone: +(64)(7)8384206
- Private Bag 3105, New Zealand Fax: +(64)(7)8384218
- -----------------------------------------------------------------
-
-