HP Forums
Little explorations with HP calculators (no Prime) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Little explorations with HP calculators (no Prime) (/thread-7955.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18


RE: Little explorations with the HP calculators - John Keith - 04-28-2017 01:24 PM

(04-19-2017 06:40 PM)DavidM Wrote:  ...

The Advanced Users Reference gives some insight into how those commands interpret the stack contents prior to execution.

...

Another great reference is Bill Wickes' "HP48 Insights Vol. 1, GX Ediition", available on the HP Museum thumb drive. The section on lists has a very clear and detailed explanation of DOLIST, DOSUBS, etc.

John


RE: Little explorations with the HP calculators - pier4r - 04-28-2017 03:01 PM

In the past, when I debugged mostly with a 50g emulator, I did not appreciate much the editor on the real 50g, I found it clumsy. Surely I knew it was limited, but not that much!

Now that I force myself to debug directly on the 50g (and therefore I prefer to do little edits directly on the system rather than transfer the file again from the PC for just some missing digits) I find the options of the built in editor quite nice compared to the idea that I had. Cut, copy, paste, I even accidentally discovered that is customizable through the MODE menu (I thought the editor was really basic without much effort put on it).

I wonder how much little useful things I will discover that were there all the time.

@John Keith. Thanks for the reference. Unfortunately the MoHPC documentation does not yet include the 50g related documents, maybe because the 50g is still too new (although 10 years may be enough for a calculator).
Could one just donate a different amount of money without receiving the thumb drive?


RE: Little explorations with the HP calculators - Gene - 04-28-2017 05:22 PM

This might be of interest:

HP 50g Advanced Users reference manual


RE: Little explorations with the HP calculators - pier4r - 04-30-2017 02:01 PM

Thanks Gene, I already have that (the problem is that I did not read it all so I may have overlooked this or that information).

For example, for my memory of the 50g user guide or 50g AUR I don't remember to have read the answer to the following question:
Does somebody knows whether a file transferred by USB to the HP 50g resides at first in memory? In other words, can I or can I not send a file to the calculator, via USB, that is larger than the free memory of the calculator itself?

Is it the same behavior for other calculators (with IR and/or serial cables)?

Update: well it seems that when a transmission fails (due to syntax error for example) the object transmitted stays on the stack as string. I'm not sure if this is a fail safe action or it was there all the time. I assume that since the object was transferred (and then parsed) it is stored in the local memory of the calculator. To test this better I may send a program composed by comments longer than the free memory to see what happens to the 50g.

Moreover I just started to appreciate that with the connectivity kit I can test simple commands directly typing them on the PC and seeing the result on the (limited) reported output of the stack. That is pretty neat although limited. Surely it is helpful to test some commands or to mangle data since one has also the history of the commands on windows. This is not like the emulator, but I don't like the emulator much, it is a neat work but I cannot use it properly.

Who programmed the connectivity kit surely had limited budget but included neat stuff.


RE: Little explorations with the HP calculators - pier4r - 05-01-2017 05:36 PM

Is there a command for reversing monodimensional arrays or vectors like REVLIST on the 50g ? (maybe thirdy party libraries that adds those?)

Or should I create one by myself? (take array, to list, revlist, array again)

Moreover if I do { 5 } V\-> it returns only 5, that is neat, but in the AUR V\-> is not documented for list. Are those "alternative use" a quirk of a command, because not designed for it, or am I missing some documentation?


RE: Little explorations with the HP calculators - pier4r - 05-02-2017 09:51 AM

From this programming challenge (nice) http://www.hpmuseum.org/forum/thread-4458.html

I discovered that a rpl variable can include points, that is neat, I thought only alphanumeric symbols were allowed.

Surely I miss the definition of what a rpl variable can contain, does someone remembers where I can find a reliable definition? I will try to search in the 50 user guide and Aur asap.

Side question: for rpl programming and built in functions in the 50g, could be that also the documentation for the family 48 and 49 (aside from the 49 g+) is useful?


RE: Little explorations with the HP calculators - DavidM - 05-02-2017 03:45 PM

(05-01-2017 05:36 PM)pier4r Wrote:  Is there a command for reversing monodimensional arrays or vectors like REVLIST on the 50g ? (maybe thirdy party libraries that adds those?)

Or should I create one by myself? (take array, to list, revlist, array again)

It's RPL so there are probably 15 different approaches that would all be valid. Smile That said, I'd be surprised if you could find a faster RPL way than you've mentioned, because REVLIST is very efficient.

(05-01-2017 05:36 PM)pier4r Wrote:  Moreover if I do { 5 } V\-> it returns only 5, that is neat, but in the AUR V\-> is not documented for list. Are those "alternative use" a quirk of a command, because not designed for it, or am I missing some documentation?

Interesting. On my 50g, "{ 5 } V→" results in a "Bad Argument Type" error. That's what I'd expect for this. I'm curious as to what's different about our 50g's that this operation gives you the result you're seeing.

If you execute "HEX RCLF", what is the result?


RE: Little explorations with the HP calculators - pier4r - 05-02-2017 03:51 PM

(05-02-2017 03:45 PM)DavidM Wrote:  Interesting. On my 50g, "{ 5 } V→" results in a "Bad Argument Type" error. That's what I'd expect for this. I'm curious as to what's different about our 50g's that this operation gives you the result you're seeing.

If you execute "HEX RCLF", what is the result?

Hmm, now it returns the same of what you mentioned. Maybe I was mistaken. I was sending commands through the connectivity kit without typing on the 50g, instead now I tried directly on the physical device.

HEX RLCF
Code:

{ # 38205410FB5h
# 8BC04h
# 12002000138h # 0h }



RE: Little explorations with the HP calculators - DavidM - 05-02-2017 04:17 PM

(05-02-2017 03:51 PM)pier4r Wrote:  Hmm, now it returns the same of what you mentioned. Maybe I was mistaken. I was sending commands through the connectivity kit without typing on the 50g, instead now I tried directly on the physical device.

That explains it. No, you aren't mistaken. I just tried it using the connectivity kit "Calculator Command" mode and saw the same thing.

My guess is that it is related to the error trapping that is being done when executing commands in that manner. You can also do something like "{ 0 } INV" and get similarly non-standard results as opposed to an error.


RE: Little explorations with the HP calculators - pier4r - 05-06-2017 03:27 PM

the Goferlist library has some commands that match the name of built in commands except for the case.

When I call, for example, Sort , will the system use the Goferlist or the built-in sort? How do I select the built in command when there is a library exposing a command with the same name?


RE: Little explorations with the HP calculators - DavidM - 05-06-2017 04:51 PM

(05-06-2017 03:27 PM)pier4r Wrote:  the Goferlist library has some commands that match the name of built in commands except for the case.

When I call, for example, Sort , will the system use the Goferlist or the built-in sort?

RPL is case-sensitive, so "Sort" is completely different from "SORT" when the appropriate command is being located.

(05-06-2017 03:27 PM)pier4r Wrote:  How do I select the built in command when there is a library exposing a command with the same name?

Short answer: detach the offending library before editing your program. But this really shouldn't be much of an issue, because it is rare that a library would intentionally replace a built-in command in the first place.

Any references to the command in question that are already in compiled form won't change just because you installed a new library, unless the library actually replaces the internal pointers to the command (this is rare -- I only mention it for completeness).


RE: Little explorations with the HP calculators - pier4r - 05-06-2017 05:14 PM

Ah good to know. I thought that keywords worked also without capslock on, I just kept typing them capitalized like a convention (and on the 50g itself I rarely use alpha alpha leftshift ).

So I was pretty lucky in all my programs.

Thanks.


RE: Little explorations with the HP calculators - pier4r - 05-14-2017 04:12 PM

Page 46 and I read a beautiful thing

http://www.hpmuseum.org/forum/thread-4804-post-44065.html#pid44065


RE: Little explorations with the HP calculators - pier4r - 05-28-2017 10:50 PM

(05-02-2017 09:51 AM)pier4r Wrote:  From this programming challenge (nice) http://www.hpmuseum.org/forum/thread-4458.html

I discovered that a rpl variable can include points, that is neat, I thought only alphanumeric symbols were allowed.

Surely I miss the definition of what a rpl variable can contain, does someone remembers where I can find a reliable definition? I will try to search in the 50 user guide and Aur asap.

Side question: for rpl programming and built in functions in the 50g, could be that also the documentation for the family 48 and 49 (aside from the 49 g+) is useful?

Both questions are still open, although due to some searches on the forum I realized that it is likely that whatever book about userRPL, aside from the focus on functions that may have changes, is helpful. So I should not restrict myself to the AUR only.

But still I would like to find a definition of what can be in the variable name in userRPL, did not find it so far.


RE: Little explorations with the HP calculators - rprosperi - 05-29-2017 12:04 AM

(05-28-2017 10:50 PM)pier4r Wrote:  Both questions are still open, although due to some searches on the forum I realized that it is likely that whatever book about userRPL, aside from the focus on functions that may have changes, is helpful. So I should not restrict myself to the AUR only.

But still I would like to find a definition of what can be in the variable name in userRPL, did not find it so far.

From the 50g User Manual, p. 2-9:

Quote:Variables are referred to by their names, which can be any combination of alphabetic and numerical characters, starting with a letter (either English or Greek). Some non-alphabetic characters, such as the arrow (→) can be used in a variable name, if combined with an alphabetical character. Thus, ‘→A’ is a valid variable name, but ‘→’ is not. Valid examples of variable names are: ‘A’, ‘B’, ‘a’, ‘b’, ‘α’, ‘β’, ‘A1’, ‘AB12’, ‘A12’, ’Vel’, ’Z0’, ’z1’, etc.
A variable can not have the same name as a function of the calculator. Some of the reserved calculator variable names are the following: ALRMDAT, CST, EQ, EXPR, IERR, IOPAR, MAXR, MINR, PICT, PPAR, PRTPAR, VPAR, ZPAR, der_, e, i, n1,n2, …, s1, s2, …, ΣDAT, ΣPAR, π, ∞.

As far as books to learn RPL, I believe the best are Bill Wickes books ( Vols-1 & 2 for the 48SX and Revised Vol-1 for the GX). Other books have longer and/or better catalogs of functions, etc. but no book I've ever found does a better job at explaining some of the elegant and subtle aspects of RPL, explained through non-trivial and quite useful examples.

All 3 of these books are included in the MoHPC Document Set, though as always the real books are more satisfying (though not cheap!).


RE: Little explorations with the HP calculators - pier4r - 05-29-2017 02:54 PM

(05-29-2017 12:04 AM)rprosperi Wrote:  
(05-28-2017 10:50 PM)pier4r Wrote:  Both questions are still open, although due to some searches on the forum I realized that it is likely that whatever book about userRPL, aside from the focus on functions that may have changes, is helpful. So I should not restrict myself to the AUR only.

But still I would like to find a definition of what can be in the variable name in userRPL, did not find it so far.

From the 50g User Manual, p. 2-9:


As far as books to learn RPL, I believe the best are Bill Wickes books ( Vols-1 & 2 for the 48SX and Revised Vol-1 for the GX). Other books have longer and/or better catalogs of functions, etc. but no book I've ever found does a better job at explaining some of the elegant and subtle aspects of RPL, explained through non-trivial and quite useful examples.

All 3 of these books are included in the MoHPC Document Set, though as always the real books are more satisfying (though not cheap!).


Thanks for the hint! For the variables, I remember the description in the user guide but it is exactly at the non alphanumeric chars that is vague. For example a point 'var.var' is ok, but an underscore 'var_var' is not, even between letters. Well I guess I will discover the rest by trial and error.

I should buy the mohpc set then, even just to finance the forum. Is it possible to buy/pay the documents accessing them in an online repository (Google Drive?), or is not possible without flash drive? This because, well, I tend to forget what thumb drive is for what, since I do not consider them as "fixed" as books. I use them mostly as rewritable memory.


RE: Little explorations with the HP calculators - rprosperi - 05-29-2017 04:32 PM

(05-29-2017 02:54 PM)pier4r Wrote:  I should buy the mohpc set then, even just to finance the forum. Is it possible to buy/pay the documents accessing them in an online repository (Google Drive?), or is not possible without flash drive? This because, well, I tend to forget what thumb drive is for what, since I do not consider them as "fixed" as books. I use them mostly as rewritable memory.

I cannot recommend buying the MoHPC Document Set strongly enough. In addition to supporting this site, it will have almost every HP-related manual and book you will look for, plus it will include many you never thought about that are interesting to browse and may well raise your interest in other machines.

Careful though, it can lead to bad collecting habits...

I simply copy the entire USB drive to my hard drive so it is always accessible, and store the USB drive for safe keeping. Even though it contains many manuals and documents, it is tiny by most current hard drive standards.


RE: Little explorations with the HP calculators - grsbanks - 05-29-2017 08:26 PM

Absolutely -- +1 here.

Note that you will more than likely have to pay customs duty on the memory stick when you get it. I had to pay about GBP 15 on top of the $39 for the goods themselves but I'm still convinced it was worth every penny.


RE: Little explorations with the HP calculators - pier4r - 05-29-2017 10:35 PM

Thanks for the info, added to the todo list although I would love to have an online repository, even if I have to pay the same.


RE: Little explorations with the HP calculators - pier4r - 06-01-2017 07:00 PM

I was able only to find this reference:

(09-30-2016 04:36 PM)Guenter Schink Wrote:  2. is already available:
a: @this a volatile comment @
b: @@this is a persistent comment@@

From this thread.

I noticed there and there the usage of "@@" in comments.

I know that "@ it is seen as comment in userRPL until end of line or the next @" but I did not try around the "@@" , is it 'just' persistent (that is, it can be seen on the calculator even after saving the program) or does it also expand on the next line until a closing "@@" is written? (that is, a multiline comment)

(bonus question: I do not remember seeing @@ in the official documentation for the 50g, is it another of my mistakes? )