home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!van-bc!rsoft!agate!usenet.ins.cwru.edu!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!aun.uninett.no!nuug!ifi.uio.no!larsg
- From: larsg@ifi.uio.no (Lars Andreas Gundersen)
- Newsgroups: comp.sys.hp48
- Subject: Problems with sys-rpl word BIND, help wanted
- Message-ID: <1992Sep6.150602.24876@ifi.uio.no>
- Date: 6 Sep 92 15:06:02 GMT
- Organization: Dept. of Informatics, University of Oslo, Norway
- Lines: 51
- Nntp-Posting-Host: maud.ifi.uio.no
- Originator: larsg@maud.ifi.uio.no
-
-
- So I thought I'd learn sys-rpl to get more speed in my programs. The
- first thing I tried was rewriting a small program into sys-rpl. I
- just couldn't get it to work. After some testing and trying I still
- couldn't make any sense of it, but I figured it might be someting with
- the BINDing of local variables. I therefore wrote a little
- test-program:
-
- ::
- CK1NOLASTWD
- CK&DISPATCH1 ZERO
- ::
- DEPTH NULL{}
- {
- ' LAM comps
- ' LAM depth
- ' LAM glbls
- }
- BIND
- LAM comps
- LAM depth
- LAM glbls
- ABND
- ;
- ;
-
- which I thought should follow this stack-diagram:
-
- |3: | |3: obj|
- |2: | ------> |2: <1d>|
- |1: obj| |1: {}|
- ------------------ ----------------
-
- Instead the program just swallows the obj and leaves the stack empty!
- Why?????? This isn't even the error(?) I had expected from the
- original program, which seemed to bind the object in level 1 and 3 to
- the two LAMnames in the LAM list, and just pop the level 2 object!? I
- also thought that, if I left out the ABND, I should be able to recall
- the local variables after the program had terminated. But I can't.
- Please someone tell me what's going on. Thanks a lot!
-
- Lars A. Gundersen
-
- PS: I tried to debug it after taking away the argument checking and
- dispatching, but when I pressed SST to execute BIND, a lot of
- externals were put on the stack, and the command DEPTH returned 209698 !
-
- PPS: The word CK<n>&DISPATCH1 should just be CK&DISPATCH1, right?
- There seemes to be quite a few errors in the manual, like the
- stack-diagram for DEPTH, which caused me a lot of frustration before I
- found out it was wrong.
-