Page 1 of 1

Automatic Alpha Mode after XEQ?

PostPosted: Wed Dec 26, 2012 7:29 pm
by bobwolfson
This is just my 2nd post. I'm new the the 41CX and trying to learn all about it.

I see that XEQ can take a numeric parameter, but isn't that relatively rare? So far, 99% of the time after pressing XEQ I want to enter a function/program name. I'm learning to reflexively hit ALPHA after XEQ, but 20% of the time I forget and just start typing my string, focusing on the keys. By the time I actually look at the display, it's too late, and I've screwed up my state or my program in ways that are sometimes not easily unwindable.

I don't suppose there's any way to change this without rewriting firmware, but can anyone tell me why, after XEQ, the calculator doesn't automatically go into ALPHA parameter mode, with the option to press ALPHA (with no actual string entered) to go in to numeric parameter mode? Accidentally entering a string when you meant to enter a number would hardly be a problem, but accidentally executing functions when you meant to be typing a string can be harmful.

Am I missing something?

Re: Automatic Alpha Mode after XEQ?

PostPosted: Thu Dec 27, 2012 9:38 pm
by Garth
The default is XEQ <local label> where it could be a numeric label, not necessarily alpha. A nice thing you can do with that in a program is for example GETKEY, GOTO IND X. GETKEY returns a numeric key value, and you can have a numeric label in the program to match it. (You would also want a SF 25 before the GOTO IND X in case a key is pressed with no matching label, and follow the GOTO IND X with GOTO the place to repeat the prompt after the error condition. Flag 25 keeps it from stopping when there's an error condition.) If you wanted to just XEQ one of the sections of the program from the keyboard, you could do for example XEQ 41, which does not take pressing ALPHA.

Re: Automatic Alpha Mode after XEQ?

PostPosted: Fri Dec 28, 2012 4:06 am
by bobwolfson
Thanks for replying Garth. Since I'm new here, I'm glad to "meet" you.

As I said in my question, I already know XEQ can accept numeric parameters, and I see what that ability can be used for. But my question was not about that.

My point was that, at least as a newbie, by far the majority of the time, whether in execution or program mode, I want to invoke XEQ with an alpha parameter. Yes, I can see that one might write programs that take advantage of XEQ (numeric label), but long before one gets there, one is going to have to use XEQ (alpha label) and XEQ (function) a ton of times. And every time, one is going to have to remember to press ALPHA right after XEQ, with problematic consequences if one forgets.

For example, the manual introduces the non-keyboard FACT function in an early chapter. Say I want to check it out for myself and I press XEQ F U N C, and while focused on finding the keys with the right letters I fail to look at the display and don't realize I've forgotten to go into ALPHA mode. By the time I look, "9_" is in the display, and, uh-oh, what else have I done. Well, I've swapped X and Y, added a stat observation, and taken the square root of what used to be Y. Ugh, I've messed up my state. Tell me that never happened/happens to you!

The question is, why didn't HP design things in reverse, i.e. so that the calculator defaulted to assuming one would follow XEQ with an alpha parameter, and allow one to get back to numeric parameter entry mode by pressing ALPHA (with the alpha entry empty)? It would save a keystroke every time one actually wanted to provide an alpha parameter to XEQ (which I sincerely believe is the majority case by far). Plus, if one meant to supply a numeric parameter but forgot to press ALPHA to go to numeric entry mode, one would merely be mistyping digits into the alpha scratch register, which isn't going to mess up the calculator's state at all.

E.g., suppose it worked as I'm suggesting and, intending to provide a numeric param to XEQ, one mistakenly pressed XEQ 1 0 instead of XEQ ALPHA 1 0. He looks up at the display, sees "10_", and realizing his error just backspaces twice, presses ALPHA and is now where he wants to be. The cost of a mistake in this scenario is insignificant, where in the prior example one has to seriously think about how to reverse the messed up state (if it's even possible).

Please understand, I'm not trying to "dis" HP or the 41. It's a marvelous machine and it's designers should rightfully have been proud of themselves. Yet, they don't seem to have optimized the entry of an XEQ instruction around the most common usage scenario, leaving the user in greater danger of hurting himself than if they had. Unless they had a reason I'm not grasping, I feel it was a fairly obvious mistake.

Re: Automatic Alpha Mode after XEQ?

PostPosted: Sat Dec 29, 2012 3:33 am
by Garth
I don't know their motives; but as you get the machine customized to your use, you will have all the non-keyboard functions you use most assigned in the USER keyboard so you will not have to spell functions very often. I keep mine in USER keyboard most of the time (with the off-white overlay on it with my hand-written key assignments). If I have to go out of USER to use a standard keyboard function, it's quicker to do that than to go into ALPHA and spell a function name. You could also have a program change the key assignments for the context, although it's not as easy as swapping out the KEYS file on the HP-71.