Frustrated by transition from HP41 to HP48



#2

Hello,

I have used my HP-41CV for more than 20 years. It helped me thru college and is helping me at work. A year ago I bought a HP48GX because of the fear of not being able to replace my HP-41 with a good quality calculator once it decides to retire and because of the stories I read in this forum (I dont know what I would do without my HP-41).

But it is time to unpack the HP-48.

I need a tip. How can I store a variable quick and dirty. In the HP-41 the comands were STO 01 and RCL 01.

In the HP-48 it has to be named in alpha-numeric, then it automatically disappears (cannot use it in the next step), then you have to go and try to find it among all kinds of temporaty variables that one has created, among variables that the statistics functions have created, among variables from plug in modules, etc. And how do you keep that mess in order? You cannot simply name a variable 'TEMP' and write replace the values it needs to be edited.

MY QUESTION:

Any tips to store a temporary variable quick and easy?

Thanks!


P.S. I use my calculator to basicaly add and multiply and ocacionally calculate an angle or a square root. However, I am looking to use some Engineering Application Packs and Celestial Navigation Packs.


#3

I know how you feel.

Back in mid-90s I got a 48. Tried to use it a bit, but it was a bear for regular calculations - or to set up for short repetitive calculations.

Ended up giving it to a friend.


Bill Wiese
San Jose CA


#4

I did the same thing as Bill. I gave the GX-48 to my wife's nephew.

tm Redwood City, CA


#5

I had the exact opposite feeling last year when I got a 48GX, before they were discontinued.

After having used 'CAS' machines for years (several brands including HP), I had a shock when trying to have 'things done' on the 48.

It was not 'too many', but 'too few' features !!
I suppose the wheel will keep on turning.


As a matter of fact, CAS machines are still very limited in what they can handle. An example may help :

<inefficient pseudo-math babble mode on>
Let x be a number.
We define the sequence B : B0 = 1 and for any integer n > 0
Bn = n.B(n-1) + x.(-1)^n
And the function f : x -> f(x) = lim(n->+inf ; Bn/n!)
Now prove that f(x) + f(-x) = 2
<inefficient pseudo-math babble mode off>

I haven't been able to solve this small problem on any calculator, while it takes less than 2 minutes with paper and pencil.
So what are they waiting for ?
Can this thing be solved on bigger systems ?
It's frustrating that the machines are so good in finding primitives and so bad in some easy areas.

#6

You can store variables with the STO key (after naming it via 'varname'). It then will show up on the soft menu under key F1. Then simply pressing F1 recalls it to the stack. Even if you have many variables, the last variable you stored will go to F1. A good way to keep things organized is as you would on a computer - create subdirectories. For this you just need to go into 'Filer' .

As for giving up your 41, you may not need to. There were millions made in the eighties and so there are still many floating around. You can easily get a backup 41 off of eBay or post a wanted ad on this site.

Steve (Maryland, USA)

#7

Hi Walter,

coming from a 32SII, I had the same problem. Once getting used to a stack with more than 4 registers, I found it to be very convenient to just leave the temporary values on the stack. For constants with a longer life, it pays to type in a descriptive name.

hth,

Thomas

#8

I initially had the same problem with my HP48. I also found it difficult to shift between display modes (FIX, SCI, STD, etc).

I resolved these problems by creating a custom menu (Chapter 30 of the User's Guide). Now my CST key brings up six labels as follows, which are mapped to the A-F keys at the top of the keyboard:

FIX . SCI . STO1 . RCL1 . STO2 . RCL2

The STO1 and RCL1 keys act like "STO 1" or "RCL 1" on other calculators. Actually, they are more convenient, because they only require one keypress, assuming the CST menu is already in the display (if not, then I have to hit the CST key first, so there are two keypresses). Left-shift STO1 or RCL1 deletes the variable.

The STO2 and RCL2 act in the same way, as a second storage register.

FIX and SCI change the display mode. For three decimal places, for example, I enter 3 and press FIX. Left-shift FIX or SCI returns the display to STD mode.

I set up this custom menu years ago and now take it for granted. But I don't use the STO1 / RCL1 and STO2 / RCL2 functions all that much anymore, now that I am used to working with the large (infinite) stack on the 48.


#9

Hello,

Thanks for this information... I also have been frustrated with the 48gx, coming from a 41cv, and was considering selling the unit. I'll try the custom menu approach...

Thanks again,
Terry


#10

If anyone is interested, here is my custom menu as described in my previous post:

{
{ "FIX" { < FIX > < STD > } }
{ "SCI" { < SCI > < STD > } }
{ "STO1" { < DUP 'RCL1' STO > < 0 'RCL1' STO > } }
RCL1
{ "STO2" { < DUP 'RCL2' STO > < 0 'RCL2' STO > } }
RCL2
}

You would create this list in the home directory, then store it in the reserved variable 'CST' (you do this by entering 'CST' STO). Then you can always bring up the menu with the CST key.

The FIX key and SCI key are for setting the display mode. Left-shift FIX or SCI returns to STD mode. Right-shift FIX or SCI is unassigned.

The STO1 and STO2 keys store the value in level 1 of the stack into a variable (either 'RCL1' or 'RCL2'). The value is left on the stack after it is stored. Left-shift STO1 or STO2 sets the stored variable to zero. Right-shift STO1 or STO2 is unassigned.

The RCL1 or RCL2 keys simply recall the variable in 'RCL1' or 'RCL2' to level 1 of the stack.

Setting up a custom menu is not really difficult once you get the hang of it. It's just a long nested list.

This is the first time that I have looked at my custom menu in several years.


#11

Thank you for the program and tips

I expanded the CST you suggested to include STO+ STO- AND STO*

#12

Aha, that is a good idea thanks, let me read chapter 30 then.

Thanks

P.S. The problem with keeping the values in the stack is that I don't remember what is what. I am used to clear the stack (4 items). Plus I believe it is not so easy to move an item in position 8 to position 1 or 2 (I skipped that part in the manual)


#13

Hello,

the one with moving an item from any position to position (or stack level) 1 is easy.

Assuming there are several items on the stack, and there's no pending command line (no visible blinking cursor), then simply press the Up-Arrow key, which sits between the VAR and NXT keys. This will start the interactive stack environment, where you can manipulate the order (amongst other things) of items on the stack.

To move the item on level 8 to level 1, just move the mark on the left side to level 8, which can be done with the cursor keys. The left side of the display shows the level number, right to the semicolon are the contents of that stack level.
So if you're at level 8, just press the menu key labelled with 'ROLL' , and there you are;-)

Now you can either move further or back inside the interactive stack, or just leave the environment by pressing the ON key. You'll see that the item which previously was in level 8, now resides in level 1.

Please note that this was a real MOVE. You could also just make a copy of the level 8 item by using the 'PICK' menu key inside the interactive stack, or by typing 8 PICK in the command line.

HTH

Raymond

#14

Hi,

You can also create a series of temporary variables that will act like registers. You can put these in any directory you want--just remember that whenever you are "active" in a subdirectory, you can use variables that are up the tree, but not the ones on other branches.

So, here is how you "emulate" the good old STO A RCL A business (where A is 01). put the (1st time) value to store on the stack. Then, press ' alpha A ' (the second single quote closes automatically). press STO. Do the same thing for B, C, D, A1 A2 etc or whatever you want your temporaries to be.

Now, when you want to store into those existing variables, just put yourself in the correct directory, put whatever value needs to be stored on level one, then push the lilac(left) shift arrow, followed by the soft key for the variable you are going to store to. That's it. It is removed from the stack. To put the value back on the stack, just push the soft-key. (If what you stored is a program, pushing the soft key will execute it--if you just want to see or edit the program, then push the green right shift, followed by the soft-key).

There are even more other ways to do things, too. The single quotes are an important tool--they make it possible to overwrite an existing variable without purging, and to create a local variable with the same name as a variable higher up in the tree....etc etc.

If you put a variable name like say A on the stack without the single quotes and it happens to be already in existence, then when you hit ENTER, its value (or its execution) will appear. If A does not yet exist, then you wil see 'A' on level 1. So now you see part of what the single quotes are all about.

Another solution, which I use sometimes, is to just run HrastProgrammer's HP-41C emulator which runs on the 48GX.....which I like using when I want to write a program in RPN rather than RPL.

I think you will find that RPL is really quite nice for a lot of work, but if you are already good at RPN programming it is sometimes consternating to switch to RPL programming (which is more like BASIC in some ways--only with an RPN order of operations).


RPN = Reverse Polish Notation which is 41, 42, 11c, 15c, 34c, 25, 67 etc.

RPL is Reverse Polish Language which is 28c 28s 48sx 48GX 49 and which has an infinite stack.

Regards,

Bill


Edited: 9 Jan 2004, 3:33 p.m.


#15

Thanks,

I think I get the idea. Your suggestions will solve my dilema. I will keep on trying.

I guess the HP-48 is too versatile (powerfull, etc.) to be just a simple adding machine.

I guess I should bring my HP-48 from home to the office(I use now my HP-48 to balance my check book)and bring my HP-41 home for retirement and use it to balance the checkbook.


#16

Quote:
I guess the HP-48 is too versatile (powerfull, etc.) to be just a simple adding machine

If you don't know, have a look at http://www.hpcalc.org you will see that the 48 is REALLY versatile.

Arnaud


#17

That web-site is the part of the reason I bought it.

I am looking for a piping stress program.

It seams that mostly civil engineers are programing....but this is another topic.

Cheers

#18

I bought a 48G out of curiosity and very quickly decided it would remain a curiosity!

For everyday quick and dirty calculations I use my 11C.

If you are used to the 41 then get another! although the 11C is easier to fit in a pocket.

#19

Walter, I know how you feel; I still use my 41CX and 16C in preference to the 48GX for daily work.

Here's a quick reference:

* To create a variable, with the desired value on the stack: press ['] [alpha] [letter] [STO]

* This will create a variable with a single-letter name; if you want to use multiple letters, press ['] [alpha] [alpha] <varname> [STO]

* To recall a variable into the stack: press [VAR], then [NXT] as necessary until you see the variable in the menu, then press the required soft-key

* To store the value in level 1 of the stack to an existing variable: press [VAR], then [NXT] as necessary until you see the variable in the menu, then press [left-shift] followed by the required soft-key.

You'll notice that storing a variable is destructive - the value disappears off the stack. If you want to retain a copy, use [ENTER] first.

With regard to the last two techniques, you might like to visualise the variables as being stored off to the left of the calculator. Then the [left-shift] soft-key approach can be interpreted as "pushing the value over to the left, into the variable". At least, that's the kind of loose way I conceptualize it, in an attempt to make sense of this complex beast that I use too infrequently.

Best,

--- Les [http://www.lesbell.com.au]

#20

Hi Walter!

You might be interested to look into the HP-41X and HP-42X emulators for the HP-48GX. Although these are commercial products I think Hrastprogrammer would not hesitate to send you demo versions for you to test.

These two emulators would give you HP-41 or HP-42S emulation and more. I especially like the possibility to easily load and save programs from an emulated HP-42S to my PC.

http://hrastprogrammer.tripod.com/

Best regards,

Erik Ehrling (Sweden)


#21

I would recommend them to all.

#22

I second Erik's suggestion.

HrastProgrammer is improving his emulators day after day: with HP41L he also added HP-IL simulation.

Recommended!

Massimo

BTW: some of the ROMs used are from my collection... :-)

#23

Forum readers --

Now that I have your attention, let me explain...

Remember the leisure suits of the mid-70's? Made of thick, coarse polyester with wide lapels and leg openings, they were neither comfortable casual wear nor were they good-looking suits. "Neither here nor there" is the English-language colloquial expression to describe something that is an ineffective compromise of two different things.

And so it is with RPL, in my opinion. Perhaps conceived as a means of adding computer-style structure to the broad and advanced capabilities of these next-generation calculators for the '90s, HP succeeded in making simple tasks difficult, and imposing a misguided consistency in place of intuitive use.

In short, RPL is "neither here nor there" -- neither a high-level computer language nor an efficient system for performing handheld-calculator tasks.

This "misguided consistency" I mention is manifested in the uniform postfix-notation that requires all input arguments for all calculator functions to be specified in advance. This approach -- the essence of RPN -- makes perfect sense for mathematical functions.

However, it is often counterintuitive for device-control functions, such as STO/RCL and FIX/SCI/ENG. On the RPN calculators, these functions (as well as LBL/GTO/GSB/XEQ) require an appended identifier, generally numerical, to complete the command. On the RPL units, the input identifier must be specified beforehand, in the interest of uniformity.

Which is easier and more intuitive:

"FIX 5" or "5 (ENTER) FIX"? 
"25.4 STO 4" or "25.4 (ENTER) 'R4' STO"?

FIX/SCI/ENG are also buried in menus or must be spelled out on the RPL calcs, but are printed on the keyboard on most RPN calcs.

As for RPL programming, compare a sophisticated RPL statement with an equivalent line in C, Basic, Fortran, or any other high-level language:

"IF (A .LT. B)  A = A + 360.0"             (Fortran '77)
"<< IF A B < THEN A 360 + 'A' STO END >>" (approximate RPL syntax)

I apologize if the the above RPL program snippet isn't quite right, but I don't have the inclination to debug it.

While complex RPN programs can be difficult to follow, at least they are prepared they way they would be approached interactively. The special constructs for RPN programming are patterned after Fortran -- the original high-level number-crunching language, predominant when computers were actually used for computing:

  • Numerical labels are like statement labels.
  • Alphanumeric labels are like entry points.
  • GTO and GSB/XEQ are like GOTO and CALL.
  • Flags are like logical variables.

RPL, by contrast, seems to be an un-nautral melding of Object-Oriented Programming (OOP) with the spirit of RPN.

Now, you might ask, "Isn't this a 17-year-old debate, going back to the introduction of the HP-28C in 1986?". Maybe so, but HP/Kinpo is continuing at least two RPL models, while the sole RPN scientific model has yet to become a commercial reality.

(BTW, I have many HP LCD-based RPN models and three RPL-models: 28C (two), a 48G, and a 49G. I also have a few AOS models from HP and Casio.)

Comments? I'm sure that there'll be some...

-- Karl


Edited: 10 Jan 2004, 9:51 p.m.


#24

RPL is for real programmers...[VPN]


#25

Veli-Pekka stated,

Quote:

RPL is for real programmers...[VPN]

C/C++ on a computer platform is for real programmers...[KS]

(But please, folks, don't continue this thread as a debate about what language "real programmers" use.)


#26

Karl Schneider wrote:

"Veli-Pekka stated,Quote: RPL is for real programmers...[VPN]"

C/C++ on a computer platform is for real programmers...[KS]

VPN> for calculator - I mean. Eiffel is the best for PC/Server IMO

(But please, folks, don't continue this thread as a debate about what language "real programmers" use.)

VPN> So you want the last word? I was originally comparing RPN for keyboard calculations (where it excels and is even better than RPL) versus programming where UserRPL (not to mention about SysRPL) clearly beats keystroke programming unless the problem is very straight forward keystroke sequence (I still like my 41 & 42 a lot) [VPN]


#27

VPN> So you want the last word? I was originally comparing RPN for keyboard calculations (where it excels and is even better than RPL) versus programming where UserRPL (not to mention about SysRPL) clearly beats keystroke programming unless the problem is very straight forward keystroke sequence

AA> Actually, you could easily use RPL as keystroke programming... I don't see the difference.

Arnaud


#28

"AA> Actually, you could easily use RPL as keystroke programming... I don't see the difference."

Line numbers are missing? [VPN]

#29

I believe that RPL is just as easy to follow as RPN, it is just a matter of getting used to it. I would certainly be more comfortable using RPN than FORTRAN which I don't know.

And as your example shows RPL is not fully postfix but I believe slightly more logical than RPN which is neither one nor the other.

Arnaud


#30

RPL is a perfect example of the Rub Goldberg (making things more complex to do) way of logical thinking.

RPN is a perfect example of the real way of logical thinking.


#31

My guess is that part of the popularity of RPN calcs such as the HP-41C series, HP-15C, HP-32SII and the HP-42S can be explained by the fact that RPN has got something that RPL has not, regardless of whether RPL can be regarded as more advanced or not.

Best regards,

Erik Ehrling (Sweden)


#32

RPL sucks. There, I said it.

I _am_ a Real Programmer, and have been for decades. I've written assembly language disk drivers, major applications in Pascal and C++, and have been working with Java and SQL databases for the last 3 years.

I used to program on RPN calculators for fun. They were simple enough that you could concentrate on the algorithm or problem rather than on the environment.

Debugging was simple: you could single step through the program, and even drop into it and add or delete steps, then continue. You can't do this with RPL.

RPL brings all this simplicity crashing down. The syntax is much more complex than the old keystroke programming model, and the infinitely deep stack means you tend to wind up holding very complex "states" in your head as you try to write or debug. And the editing environment simply displays your code as a single long string, with no indentation, line feeds, or other formatting possible to provide hints to structure.

The RPL calculators _do_ have a number of advantages: much more memory (as I've been scanning old HP and TI calculator programs for the past few months I've really grown to appreciate this), huge displays, the ability to assign units to values, which are then carried correctly through the calculation; the easy integration of alphanumerics, and let's not forget the symbolic math capabilities!

But as the previous discussion on simply storing and recalling a value to memory shows, they suck as regular calculators. And they require much more effort to program than the old keystroke programmables. And most of their higher level functions and handled better by personal computers.

Personally, I'd like to see a super-41 with 10 times the performance and memory of the old 41CX, and perhaps a larger display. But that will never happen.


#33

... you clearly hit the nail on the head, and brought genuine expertise to the discussion. Thank you!

#34

It is not because you have more power available that you have to use it. You can very well limit yourself to 4 level satck while programming in RPL and I haven't seen any RPN calc providing indentation of the code either. For me I really can't see much difference between a badly written RPL program and an RPN one. And still the RPL program will run faster.

Arnaud


#35

Yes, you _could_ limit yourself to a 4 level stack. However, with RPL's requirement that all arguments to any function (such as, say, STO) be on the stack before the function can be executed, stack use is going to be greater for most RPL programs.

And of course you don't have indentation or formatting on the old keystroke programmables like the 41: you didn't _need_ it for a simple key code listing. RPL brings the complexity of a real programming language without even the most basic tools to edit and debug it.

Most of my complaints about RPL would vanish if HP would simply provide a semi-decent editor for RPL programs on the calculator. Really-- how hard could this be?


#36

"Most of my complaints about RPL would vanish if HP would simply provide a semi-decent editor for RPL programs on the calculator. Really-- how hard could this be?"

It must be the lack of resources, JYA could do it.
Say: BOLD for any System Keyword, Cursive for Library keywords, Code Underlined and User Programs Standard Text.
All this with Rich Text support and Intended Syntax.
The current Searc/Replace is adaque. Regular expression and macros would enhance the editor to the limit. Well Emacs is there, but still I'f prefer syntax hilighting using Rich Text format, which would also give non-program text capabilities = Unix & MS compatibility (write/wordpad) [VPN] - opinions only

#37

Hello,

please take a look at www.hpcalc.org , there exist various program development environments and tools for the HP-48, some for running on the HP-48 itself and some for usage on a PC.
And yes, HP provided some of the tools, namely the PDL (Program Development Link) for user code programming, and RPLTOOLS for system language programming. Both tool sets exist since the very early nineties, short time after introduction of the first HP-48...
And for the editor, there are many nice program and text editors for usage on the HP-48 directly.

Regards,

Raymond


#38

Thanks for the reference on "native" editors for the 40 series. I'll check them out.

#39

I understand the frustration, it took me some time to get used to the 48 myself. My first HP was a 41CV.

I think RPL is brilliant from a conceptual point of view, and I like the purity of its concepts (broken mainly by IF-clauses). However, I too find that the programs are hard to read, edit and debug. While the fact that everything is an object that can be treated and evaluated in a uniform way makes it extremely powerful and versatile, its complete lack of declaring/checking input and output parameters makes it *very* error-prone. Other high-level languages detect missing input parameters and discard unused return values automatically, but not RPL.

Furthermore, it is far too compilcated to create nice 'packages' for your programs so that you wouldn't see all the subroutines and temporary variables when you enter a program's directory. Having to use a library builder or provide a custom menu (and always have to press CST first because you can't set it to appear automatically) is just too clumsy.

I eventually got the hang of it, although it still takes me longer to accomplish something than it did on my HP-41.

Just my 2 cents (actually, centimes),
Victor

#40

> And still the RPL program will run faster.


Put the HP49G+ software on the HP41 hardware and the 41 software on the HP49G+ hardware and RPL may not be a --very-- brilliant idea !!


On RPL :
Of course a better editor is useful, but what is needed really is a fully-fledged debugger. I'm sure bigger machines are living think-tanks for possible ideas.


Side note : posting from my Mac eats single ends of lines, do others experience this ??


#41

It's the forum software, not the Mac. If you'd like a single line breakt, insert a [nl] into the text. You can always check what it'll look like with the preview *before* posting. More formatting options are under advanced formatting techniques.

Cheers,
Victor


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP-41C Transition to HP-28C book? Dan Grelinger 6 2,223 03-30-2013, 10:32 AM
Last Post: David Hayden
  Looking for HP calculators... I´m frustrated Fabricio 25 5,679 01-19-2012, 03:30 AM
Last Post: Patrick Rendulic
  HP41 Emulation on HP48 Series Alexander Wassermann 2 1,045 11-10-2008, 08:40 PM
Last Post: Matt Kernal
  Comparing the HP41 and HP48 (RPN/RPL subject) Vieira, Luiz C. (Brazil) 3 1,322 02-27-2006, 04:14 PM
Last Post: Karl Schneider
  HP41/42 to HP48 problems Chris morris 1 955 09-29-1999, 09:14 PM
Last Post: Chris Morris
  HP41 to HP48 (problems) steve 0 817 04-14-1999, 10:43 AM
Last Post: Steve

Forum Jump: