package.hlp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. The Utah Package System (UPS)
  2. ----------------------------
  3. A preliminary multi-name space capability is available for testing.
  4. This is a loadable option (Load Package).
  5. Syntactically, an id now becomes a multipart name, "PACKAGE\localId" which
  6. directs the INTERN part of token scanning to start searching a PATH in a
  7. linked Oblist structure from PACKAGE, itself an id accessible in the
  8. "CurrentPackage". The Print name is still "localId", but an additional
  9. field in each id, the Package Cell, records PACKAGE. A modified Prin1 and
  10. Prin2 access this field. The Root of the tree is GLOBAL, indicated by \.
  11. Thus \ID is guaranteed in the root (in fact the existing Oblist).
  12. PAKAGE.RED defines the following Fluids:
  13. \CurrentPackage!* %. Start of Search Path
  14. \PackageNames!* %. List of ALL package names
  15. \CurrentPackage!* is rebound in the Token Scanner on encountering a "\".
  16. The following functions should be used:
  17. \CreatePackage(Name,FatherPackage) which creates a convenient size
  18. hashtable
  19. \PackageP(name)
  20. \SetPackage(name)
  21. \PathInternP({id, string}) Searchs from CurrentPackage!*
  22. \PathIntern({id, string}) Lookup or insert
  23. \PathRemob({id, string}) Remobs, puts in NIL package
  24. \PathMapObl(function) Applies to ALL ids in path
  25. \LocalInternP({id, string}) Searchs in CurrentPackage!*
  26. \LocalIntern({id, string}) Lookup or insert in CurrentPackage!*
  27. \LocalRemob({id, string}) Remobs, puts in NIL package
  28. \LocalMapObl(function) Applies to ALL ids in CurrentPackage!*
  29. Note that if a string is used, it CANNOT include the \. Also, since most
  30. id's are "RAISED" on input, be careful.
  31. Current INTERN etc are \PathIntern, etc.