From: John H Meyers on
On Wed, 07 Dec 2005 16:23:55 -0600, Joe Horn wrote:

> Strangely, :n:FOO does not only refer to FOO in port n;
> it will resolve to FOO in main memory
> if FOO does not exist in port n.
> Whether that's a misfeature or a misbug is unclear.

Could be useful to shorten programming,
allowing objects more freedom to be stored
wherever you want, with automatic searching,
just like the upward directory search.

Only problem is if same name is re-used for different stuff.

[r->] [OFF]
From: John H Meyers on
On Mon, 05 Dec 2005 13:18:47 -0600:
[I'm the ninth to respond, hope I don't waste your time :]

> What is a library for the HP48/49

A library hides out of sight,
runs from elsewhere than where your variables are stored,
is unmodifiable at execution time.

Guess what? -- all the built-in commands
reside in libraries, hiding in ROM
(and one library may contain many related or unrelated objects).

> and how is it different from a program written in UserRPL?

Can be in UserRPL!
(you might be surprised to see some UserRPL even within ROM!)

"Library" is more "where you keep it,"
rather than "what compiler you used."

Since we can't add more to internal ROM ourselves,
where it goes for us is in the independent
memory spaces (ports) -- plug-in cards for 48,
extra internal RAM and flash banks for 49,
and one "artificial" space (Port 0)
carved out of unused main RAM (which allowed library use
even on original 48 with no add-on memory).

> Is there an advantage to having programs in a library?

More permanent and secure, but less accessible for maintenance.

Executes slightly faster because searching for names
moves to compile time, rather than run time.

> How do I learn how to make a library and how to use it on the calculator?

http://groups.google.com/group/comp.sys.hp48/browse_frm/thread/17b9b947da5f099c
http://groups.google.com/group/comp.sys.hp48/browse_frm/thread/f5e68ce6bf876547
http://groups.google.com/group/comp.sys.hp48/browse_frm/thread/cf344ed52350b695

As a practical example, I distributed these 'XC' programs for HP49G[+]
(which stops the CAS from changing modes & deleting variables)
in a form so that they can be installed either in variables
or as a library -- note that they are mostly UserRPL:
http://groups.google.com/group/comp.sys.hp48/msg/2f30a3dce3ad6d00
http://www.hpcalc.org/details.php?id=5493
http://www.hpcalc.org/hp49/math/symbolic/xc49v02.zip

[r->] [OFF]