Post Reply 
CRLIB, what next?
05-09-2014, 10:44 AM
Post: #1
CRLIB, what next?
I tried to create a library today on a 50g. CRLIB appears to work, the library goes on the stack. I saved it in port 0. The library shows up in port 0. I warmstart and the library shows up in the LIB menu. I also did libno ATTACH just for fun, in the HOME directory.

Alas, I cannot access any of the commands in the library. I hope I missed something minor.

Any suggestions where I messed up or what to check?

Thanks.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
05-09-2014, 12:40 PM
Post: #2
RE: CRLIB, what next?
(05-09-2014 10:44 AM)HP67 Wrote:  Alas, I cannot access any of the commands in the library. I hope I missed something minor.

Not sure what you mean by "cannot access" the commands. Do the $VISIBLE commands show up in your library menu?

I've been using CRLIB myself recently and haven't (yet) come across any problems.

Paul
Visit this user's website Find all posts by this user
Quote this message in a reply
05-09-2014, 01:26 PM (This post was last modified: 05-09-2014 01:28 PM by HP67.)
Post: #3
RE: CRLIB, what next?
(05-09-2014 12:40 PM)pdo Wrote:  Not sure what you mean by "cannot access" the commands.

Hi,

None of the programs in the library are recognized. When I type in the name of a program that should be in the library it remains quoted on the stack and EVAL does nothing. All the commands in the library don't appear to be recognized at all.

(05-09-2014 12:40 PM)pdo Wrote:  Do the $VISIBLE commands show up in your library menu?

No, I have no visible commands. I understood from the doc $VISIBLE is only for variables you want to show up in the VAR menu. This library is only supposed to contain commands (programs). They are all in the $HIDDEN list.

Thanks.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
05-09-2014, 04:22 PM
Post: #4
RE: CRLIB, what next?
(05-09-2014 01:26 PM)HP67 Wrote:  No, I have no visible commands. I understood from the doc $VISIBLE is only for variables you want to show up in the VAR menu. This library is only supposed to contain commands (programs). They are all in the $HIDDEN list.

Thanks.

I believe you've indicated the source of the problem. The names of objects in the $HIDDEN list are only available to other objects in the library itself (or SysRPL objects when coded in a special way). To make the names be recognized outside of the library, you have to put them in the $VISIBLE list.
Find all posts by this user
Quote this message in a reply
05-09-2014, 10:37 PM
Post: #5
RE: CRLIB, what next?
Also, add the variable $CONFIG containing "<< LIB# ATTACH >>" (without the quotes, i.e. an RPL program) in the folder you convert to the library where LIB# is the Library number you've chosen to create. This short routine is run during system init after [ON]-[F3] or power-up, and the above simple code makes the library automatically attach itself, so you don't have to.

Assume you also have $TITLE (a string), $ROMID (hex BINT), and possibly $HIDDEN as discussed above. These are described in usrlib.txt on Goodies Disk #1, avail on hpcalc.org as well as many other collections of the initial HP docs on RPL tools

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
05-10-2014, 06:15 PM (This post was last modified: 05-11-2014 05:51 AM by HP67.)
Post: #6
RE: CRLIB, what next?
Guys, thank you very much. I will try this shortly. I would like to avoid having the command names show up in the VAR list. The doc isn't very clear on this.

I understood if you specify a number real or integer in $CONFIG then CRLIB creates a "default config" that attaches the library.

It seems that part works, so perhaps I don't have to actually create the ATTACH command?

Thank you both.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
05-10-2014, 08:12 PM
Post: #7
RE: CRLIB, what next?
(05-10-2014 06:15 PM)HP67 Wrote:  Guys, thank you very much. I will try this shortly. I would like to avoid having the command names show up in the VAR list. The doc isn't very clear on this.

The commands should only show up in the list of your library's commands when you navigate to it via LIB (right-shift-2). Attaching a library doesn't inherently change the VAR menu objects in any way.

There is also the concept of scope at play here, and that might be causing some confusion. Normally, you want to attach a library while the HOME directory is active (sometimes referred to as "attaching to the HOME directory"). This makes all of the commands/objects in your library available to all objects (regardless of which directory they are in), but that's not the same thing as copying them to the actual HOME directory. Does that help clarify things?
Find all posts by this user
Quote this message in a reply
05-11-2014, 05:49 AM (This post was last modified: 05-11-2014 05:52 AM by HP67.)
Post: #8
RE: CRLIB, what next?
Thanks, David. Your suggestions were right on the money. The programs show up in the LIB menu and don't clutter the variables. I understood the scope issue from reading the manual earlier but thank you for mentioning it.

The library doesn't seem to attach automagically on the 48s, so Bob's suggestion obviously applies there.

On to the next problem now Wink

On my 50g the library self-attaches and works fine. I can't get the library to work on an HP 48SX or G. The code is all User RPL and the code itself runs on the SX and G. But the library doesn't seem to work there. Is this expected, or should it work?

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
05-11-2014, 10:16 AM
Post: #9
RE: CRLIB, what next?
(05-11-2014 05:49 AM)HP67 Wrote:  On my 50g the library self-attaches and works fine. I can't get the library to work on an HP 48SX or G. The code is all User RPL and the code itself runs on the SX and G. But the library doesn't seem to work there. Is this expected, or should it work?

You need to create the library on each platform. HACK library is your friend here. At least for 48G, not sure for S.
HTH,
Find all posts by this user
Quote this message in a reply
05-11-2014, 10:23 AM
Post: #10
RE: CRLIB, what next?
Thanks. First I'll try editing the header briefly. If that doesn't work, I'll try your suggestion.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
05-12-2014, 03:18 PM
Post: #11
RE: CRLIB, what next?
I used D->LIB by Detlef Mueller from hpcalc.org. It is very simple and works great on the SX and Gs I have. I would recommend it highly to anyone wanting a simple and intuitive device-hosted library creator for the HP 48.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 4 Guest(s)