home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!mcsun!sun4nl!gamma!jurjen
- From: jurjen@gamma.irdeto.nl (/home/other/jurjen/.name)
- Subject: Moving directories (was: Re: some general questions for HP48)
- Message-ID: <C0qGvp.5MC@gamma.irdeto.nl>
- Summary: not as simple as you think...
- Sender: Jurjen N.E. Bos (jurjen@cwi.nl)
- Organization: STORC, Postbus 616, Eindhoven
- References: <C0K50D.3BG@news.iastate.edu> <2b51c39c.2613.1comp.sys.hp48.1@hpcvb <2b51c506.2613.2comp.sys.hp48.1@hpcvbbs.cv.hp.com>
- Date: Tue, 12 Jan 1993 08:57:24 GMT
- Lines: 27
-
-
- The idea to move a directory by recalling, purging (PGDIR), and storing can
- loose your directory. The PGDIR command will probably destroy your directory
- and leave an empty directory on stack.
- The reason is that a recalled directory on the stack can be modified if the
- original directory is modified. PGDIR deletes the variables in directory one
- by one, so your directory on stack might end up empty. The solution is to
- do a NEWOB on the recalled directory, but this uses just as much memory as
- moving the directory by first storing a copy.
- As far as I know, there is NO user RPL solution to move a directory if there is
- not enough memory for an extra copy except for moving the variables one by
- one.
- There is a solution to this problem, but it needs a system RPL specialist to
- program:
-
- (If you don't know about system RPL don't try reading this :-)
- - make a TEMPOB copy of all variables in the directory
- - recall the directory
- - purge the directory with the regular PURGE
- It might be an idea to program a RCLPURGE command that works on all objects.
- Don't forget to check for ROMPTRs!
-
- --
- /*--- Jurjen N.E. Bos ------------------- Email: jurjen@irdeto.nl ---*/
-
- int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,g=c*2;c
- -=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b);}
-