home *** CD-ROM | disk | FTP | other *** search
- From: akcs.nomad@hpcvbbs.cv.hp.com (Adam Cowen)
- Date: Tue, 28 Jul 1992 06:40:02 GMT
- Subject: Tricks with pointers
- Message-ID: <2a74e987.1492comp.sys.hp48@hpcvbbs.cv.hp.com>
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!hp-cv!hp-pcd!hpcvra!rnews!hpcvbbs!akcs.nomad
- Newsgroups: comp.sys.hp48
- Keywords: pointers
- Lines: 22
-
- Hi there,
- Well I was playing around with my calc the other day, and found out
- this neat, but basically useless fact. Say I have the directory FONE in
- my HOME dirctory. If I recall the directory to the stack ('FONE' RCL)
- which as most know does not really recall it to the stack, but just
- points to the memory location which holds the dir FONE. Anywyas the dir
- is recalled to the stack. Now if I type 'FONE' PGDIR it transfers the
- pointers and the directory object is on the stack, and is not just a
- pointer to a memory location (same as performing a NEWOB).
- Well what I wasn't expecting is if you go back to the point where the
- dir on the stack points to the mem location, and the directory still
- exists, but take a different approach. What you next do is go into the
- directory and do a CLVAR (clears all vars in a directory). This thime
- instead of the HP moving the object to the stack, after the HP has
- cleared all vars the stack reads
- 1: DIR END
-
- Oh well I thought it was neat. Hope I didn't waste too much bandwidth!
-
- Adam Cowen
- VP of Edmontons HP Club
- Email: hpclub@ee.ualberta.ca
-
-