home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp48 / 5565 < prev    next >
Encoding:
Internet Message Format  |  1992-11-05  |  3.0 KB

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