home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp48 / 6926 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.sys.hp48
  2. Path: sparky!uunet!mcsun!sun4nl!gamma!jurjen
  3. From: jurjen@gamma.irdeto.nl (/home/other/jurjen/.name)
  4. Subject: Moving directories (was: Re: some general questions for HP48)
  5. Message-ID: <C0qGvp.5MC@gamma.irdeto.nl>
  6. Summary: not as simple as you think...
  7. Sender: Jurjen N.E. Bos (jurjen@cwi.nl)
  8. Organization: STORC, Postbus 616, Eindhoven
  9. References: <C0K50D.3BG@news.iastate.edu> <2b51c39c.2613.1comp.sys.hp48.1@hpcvb <2b51c506.2613.2comp.sys.hp48.1@hpcvbbs.cv.hp.com>
  10. Date: Tue, 12 Jan 1993 08:57:24 GMT
  11. Lines: 27
  12.  
  13.  
  14. The idea to move a directory by recalling, purging (PGDIR), and storing can
  15. loose your directory.  The PGDIR command will probably destroy your directory
  16. and leave an empty directory on stack.
  17. The reason is that a recalled directory on the stack can be modified if the
  18. original directory is modified.  PGDIR deletes the variables in directory one
  19. by one, so your directory on stack might end up empty.  The solution is to
  20. do a NEWOB on the recalled directory, but this uses just as much memory as
  21. moving the directory by first storing a copy.
  22. As far as I know, there is NO user RPL solution to move a directory if there is
  23. not enough memory for an extra copy except for moving the variables one by
  24. one.
  25. There is a solution to this problem, but it needs a system RPL specialist to
  26. program:
  27.  
  28. (If you don't know about system RPL don't try reading this :-)
  29. - make a TEMPOB copy of all variables in the directory
  30. - recall the directory
  31. - purge the directory with the regular PURGE
  32. It might be an idea to program a RCLPURGE command that works on all objects.
  33. Don't forget to check for ROMPTRs!
  34.  
  35. -- 
  36. /*---   Jurjen N.E. Bos   -------------------   Email: jurjen@irdeto.nl   ---*/
  37.  
  38. 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
  39. -=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);}
  40.